This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
SorceryCraft/Jenkinsfile

41 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-03-01 18:19:59 +00:00
pipeline {
agent {
docker {
image 'openjdk:8-jdk'
}
}
stages {
stage('Build') {
steps {
2020-12-15 19:04:06 +00:00
sh './gradlew build javadoc'
2020-03-01 18:19:59 +00:00
}
post {
success {
archiveArtifacts artifacts: 'build/libs/*', fingerprint: true
2020-05-02 18:42:16 +00:00
publishHTML target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
2020-05-02 18:54:43 +00:00
reportDir: 'build/docs/javadoc',
2020-05-02 18:42:16 +00:00
reportFiles: 'index.html',
reportName: 'JavaDoc'
]
2020-03-01 18:19:59 +00:00
}
}
}
2020-12-15 19:04:06 +00:00
stage('Publish') {
when {
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
}
steps {
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge publish'
}
}
}
2020-03-01 18:19:59 +00:00
}
}