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
TheBrokenRail 4c85f10acb
All checks were successful
EnergonRelics/pipeline/head This commit looks good
Fix Jenkins
2020-08-08 17:57:45 -04:00

42 lines
1.2 KiB
Groovy

pipeline {
agent {
docker {
image 'openjdk:11-jdk'
}
}
stages {
stage('Build') {
steps {
sh './gradlew build javadoc'
}
post {
success {
archiveArtifacts artifacts: 'build/libs/*', fingerprint: true
publishHTML target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
reportDir: 'build/docs/javadoc',
reportFiles: 'index.html',
reportName: 'JavaDoc'
]
}
}
}
stage('Publish') {
when {
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
}
steps {
sh './gradlew publish'
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge'
}
}
}
}
}