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 | |
| 4 | node("python") { |
| 5 | try{ |
| 6 | stage("checkout") { |
| 7 | gerrit.gerritPatchsetCheckout ([ |
| 8 | credentialsId : CREDENTIALS_ID |
| 9 | ]) |
| 10 | sh("git submodule init; git submodule sync; git submodule update --recursive") |
| 11 | } |
| 12 | stage("test") { |
| 13 | wrap([$class: 'AnsiColorBuildWrapper']) { |
| 14 | sh("make test") |
| 15 | } |
| 16 | } |
| 17 | } catch (Throwable e) { |
| 18 | // If there was an error or exception thrown, the build failed |
| 19 | currentBuild.result = "FAILURE" |
| 20 | throw e |
| 21 | } finally { |
| 22 | common.sendNotification(currentBuild.result,"",["slack"]) |
| 23 | } |
| 24 | } |