Added 12h timeout to all pipelines
Change-Id: I085fcbda322d0877d5ffebd002fc109577788c29
diff --git a/aptly-promote-pipeline.groovy b/aptly-promote-pipeline.groovy
index 99a07e1..c196ccd 100644
--- a/aptly-promote-pipeline.groovy
+++ b/aptly-promote-pipeline.groovy
@@ -22,27 +22,27 @@
} catch (MissingPropertyException e) {
storages = ['local']
}
+timeout(time: 12, unit: 'HOURS') {
+ node() {
+ try{
+ stage("promote") {
+ lock("aptly-api") {
+ for (storage in storages) {
-node() {
- try{
- stage("promote") {
- lock("aptly-api") {
- for (storage in storages) {
-
- if (storage == "local") {
- storage = ""
+ if (storage == "local") {
+ storage = ""
+ }
+ aptly.promotePublish(APTLY_URL, SOURCE, TARGET, RECREATE, components, packages, DIFF_ONLY, '-d --timeout 600', DUMP_PUBLISH.toBoolean(), storage)
}
-
- aptly.promotePublish(APTLY_URL, SOURCE, TARGET, RECREATE, components, packages, DIFF_ONLY, '-d --timeout 600', DUMP_PUBLISH.toBoolean(), storage)
}
}
+ } catch (Throwable e) {
+ // If there was an error or exception thrown, the build failed
+ currentBuild.result = "FAILURE"
+ currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
+ throw e
+ } finally {
+ common.sendNotification(currentBuild.result,"",["slack"])
}
- } catch (Throwable e) {
- // If there was an error or exception thrown, the build failed
- currentBuild.result = "FAILURE"
- currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
- throw e
- } finally {
- common.sendNotification(currentBuild.result,"",["slack"])
}
-}
+}
\ No newline at end of file