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.
EnergonRelics/Jenkinsfile

42 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-07-13 16:46:44 -04:00
pipeline {
agent {
docker {
2020-08-04 13:25:49 -04:00
image 'openjdk:11-jdk'
2020-07-13 16:46:44 -04:00
}
}
stages {
stage('Build') {
steps {
2020-08-07 17:34:55 -04:00
sh './gradlew build javadoc'
2020-07-13 16:46:44 -04:00
}
post {
success {
archiveArtifacts artifacts: 'build/libs/*', fingerprint: true
2020-08-04 13:06:11 -04:00
publishHTML target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
reportDir: 'build/docs/javadoc',
reportFiles: 'index.html',
reportName: 'JavaDoc'
]
2020-07-13 16:46:44 -04:00
}
}
}
2020-08-07 17:34:55 -04:00
stage('Publish') {
when {
2020-08-07 17:51:16 -04:00
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
2020-08-07 17:34:55 -04:00
}
steps {
sh './gradlew publish'
2020-08-08 17:57:45 -04:00
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
2020-08-08 17:39:38 -04:00
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge'
}
2020-08-07 17:34:55 -04:00
}
}
2020-07-13 16:46:44 -04:00
}
}