diff options
| author | 2019-01-26 16:27:48 +0000 | |
|---|---|---|
| committer | 2019-01-26 16:27:48 +0000 | |
| commit | dec0a246f248dbf7c9199ff19c50062f5ae336b4 (patch) | |
| tree | ad9d90b8eccd37d96c38689e529ad2853bc7d2eb /Jenkinsfile | |
| parent | Fix navigation to inner classes not decompiling outer class (diff) | |
| download | enigma-dec0a246f248dbf7c9199ff19c50062f5ae336b4.tar.gz enigma-dec0a246f248dbf7c9199ff19c50062f5ae336b4.tar.xz enigma-dec0a246f248dbf7c9199ff19c50062f5ae336b4.zip | |
Rewrite the Jenkinsfile to use the new declarative pipeline syntax, lets hope it still works.
This will only push to maven on the master branch now.
Diffstat (limited to 'Jenkinsfile')
| -rw-r--r-- | Jenkinsfile | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 655deb3f..abc157cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile | |||
| @@ -1,15 +1,26 @@ | |||
| 1 | node { | 1 | pipeline { |
| 2 | stage 'Checkout' | 2 | agent any |
| 3 | stages { | ||
| 3 | 4 | ||
| 4 | checkout scm | 5 | stage ('Build') { |
| 6 | steps { | ||
| 7 | sh "rm -rf build/libs/" | ||
| 8 | sh "chmod +x gradlew" | ||
| 9 | sh "./gradlew build" | ||
| 5 | 10 | ||
| 6 | stage 'Build' | 11 | archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true |
| 12 | } | ||
| 13 | } | ||
| 7 | 14 | ||
| 8 | sh "rm -rf build/libs/" | 15 | stage ('Archive artifacts') { |
| 9 | sh "chmod +x gradlew" | 16 | //Only publish to maven when on master branch |
| 10 | sh "./gradlew build" | 17 | when { |
| 18 | branch 'master' | ||
| 19 | } | ||
| 20 | steps { | ||
| 21 | sh "./gradlew upload" | ||
| 22 | } | ||
| 23 | } | ||
| 11 | 24 | ||
| 12 | stage "Archive artifacts" | 25 | } |
| 13 | 26 | } \ No newline at end of file | |
| 14 | sh "./gradlew upload" | ||
| 15 | } | ||