You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
pipeline { |
|
agent { |
|
docker { |
|
image 'openjdk:8-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 { |
|
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) { |
|
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge publish' |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|