Update to new pipeline style, only build on master

This commit is contained in:
modmuss50 2019-01-26 20:12:19 +00:00
parent dc75d45c51
commit 0beca7f877

29
Jenkinsfile vendored
View file

@ -1,15 +1,18 @@
node {
stage 'Checkout'
pipeline {
agent any
stages {
checkout scm
stage ('Build') {
when {
branch 'master'
}
steps {
sh "rm -rf build/libs/"
sh "chmod +x gradlew"
sh "./gradlew build uploadArchives curseforge --refresh-dependencies --stacktrace"
stage 'Build'
sh "rm -rf build/libs/"
sh "chmod +x gradlew"
sh "./gradlew build uploadArchives curseforge --refresh-dependencies --stacktrace"
stage "Archive artifacts"
archive 'build/libs/*'
}
archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true
}
}
}
}