Added 12h timeout to all pipelines
Change-Id: I085fcbda322d0877d5ffebd002fc109577788c29
diff --git a/update-salt-environment.groovy b/update-salt-environment.groovy
index 0b570fc..b91f385 100644
--- a/update-salt-environment.groovy
+++ b/update-salt-environment.groovy
@@ -13,42 +13,43 @@
def common = new com.mirantis.mk.Common()
def python = new com.mirantis.mk.Python()
def venvPepper = "venvPepper"
+timeout(time: 12, unit: 'HOURS') {
+ node() {
+ try {
+ python.setupPepperVirtualenv(venvPepper, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
-node() {
- try {
- python.setupPepperVirtualenv(venvPepper, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
-
- stage("Update formulas"){
- if(UPDATE_FORMULAS.toBoolean()){
- common.infoMsg("Updating salt formulas")
+ stage("Update formulas"){
+ if(UPDATE_FORMULAS.toBoolean()){
+ common.infoMsg("Updating salt formulas")
+ salt.cmdRun(
+ venvPepper,
+ "I@salt:master",
+ 'apt-get update && apt-get install -y salt-formula-*'
+ )
+ common.infoMsg("Running salt sync-all")
+ salt.runSaltProcessStep(venvPepper, 'jma*', 'saltutil.sync_all', [], null, true)
+ }
+ }
+ stage("Update Reclass") {
+ common.infoMsg("Updating reclass model")
salt.cmdRun(
venvPepper,
"I@salt:master",
- 'apt-get update && apt-get install -y salt-formula-*'
+ 'cd /srv/salt/reclass && git pull -r && git submodule update',
+ false
)
- common.infoMsg("Running salt sync-all")
- salt.runSaltProcessStep(venvPepper, 'jma*', 'saltutil.sync_all', [], null, true)
- }
- }
- stage("Update Reclass") {
- common.infoMsg("Updating reclass model")
- salt.cmdRun(
- venvPepper,
- "I@salt:master",
- 'cd /srv/salt/reclass && git pull -r && git submodule update',
- false
- )
- salt.enforceState(
- venvPepper,
- "I@salt:master",
- 'reclass',
- true
- )
+ salt.enforceState(
+ venvPepper,
+ "I@salt:master",
+ 'reclass',
+ true
+ )
+ }
+ } catch (Throwable e) {
+ // If there was an error or exception thrown, the build failed
+ currentBuild.result = "FAILURE"
+ throw e
}
- } catch (Throwable e) {
- // If there was an error or exception thrown, the build failed
- currentBuild.result = "FAILURE"
- throw e
}
}
\ No newline at end of file