blob: 6c846062e25447feb5971331c77102906fd96478 [file] [log] [blame]
Jakub Josefc5a223a2017-03-01 14:40:08 +01001def common = new com.mirantis.mk.Common()
2def aptly = new com.mirantis.mk.Aptly()
3node() {
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}