Jakub Josef | c5a223a | 2017-03-01 14:40:08 +0100 | [diff] [blame^] | 1 | def common = new com.mirantis.mk.Common() |
| 2 | def aptly = new com.mirantis.mk.Aptly() |
| 3 | node() { |
| 4 | try{ |
| 5 | stage("promote") { |
| 6 | lock("aptly-api") { |
| 7 | wrap([$class: 'AnsiColorBuildWrapper']) { |
| 8 | aptly.promotePublish(APTLY_URL, SOURCE, TARGET, RECREATE, null, null, DIFF_ONLY) |
| 9 | } |
| 10 | } |
| 11 | } |
| 12 | } catch (Throwable e) { |
| 13 | // If there was an error or exception thrown, the build failed |
| 14 | currentBuild.result = "FAILURE" |
| 15 | throw e |
| 16 | } finally { |
| 17 | common.sendNotification(currentBuild.result,"",["slack"]) |
| 18 | } |
| 19 | } |