Jakub Josef | c5a223a | 2017-03-01 14:40:08 +0100 | [diff] [blame] | 1 | def common = new com.mirantis.mk.Common() |
| 2 | def gerrit = new com.mirantis.mk.Gerrit() |
| 3 | node("python") { |
| 4 | try{ |
| 5 | stage("checkout") { |
| 6 | gerrit.gerritPatchsetCheckout ([ |
| 7 | credentialsId : CREDENTIALS_ID |
| 8 | ]) |
| 9 | } |
| 10 | stage("test") { |
| 11 | wrap([$class: 'AnsiColorBuildWrapper']) { |
| 12 | sh("make clean") |
| 13 | sh("[ $SALT_VERSION != 'latest' ] || export SALT_VERSION=''; make test") |
| 14 | } |
| 15 | } |
| 16 | } catch (Throwable e) { |
| 17 | // If there was an error or exception thrown, the build failed |
| 18 | currentBuild.result = "FAILURE" |
| 19 | throw e |
| 20 | } finally { |
| 21 | common.sendNotification(currentBuild.result,"",["slack"]) |
| 22 | } |
| 23 | } |