Added 12h timeout to all pipelines
Change-Id: I085fcbda322d0877d5ffebd002fc109577788c29
diff --git a/delete-broken-stacks-pipeline.groovy b/delete-broken-stacks-pipeline.groovy
index 85d7898..c68fe9e 100644
--- a/delete-broken-stacks-pipeline.groovy
+++ b/delete-broken-stacks-pipeline.groovy
@@ -15,33 +15,34 @@
git = new com.mirantis.mk.Git()
openstack = new com.mirantis.mk.Openstack()
salt = new com.mirantis.mk.Salt()
+timeout(time: 12, unit: 'HOURS') {
+ node {
-node {
+ // connection objects
+ def openstackCloud
+ // value defaults
+ def openstackVersion = OPENSTACK_API_CLIENT ? OPENSTACK_API_CLIENT : 'liberty'
+ def openstackEnv = "${env.WORKSPACE}/venv"
- // connection objects
- def openstackCloud
- // value defaults
- def openstackVersion = OPENSTACK_API_CLIENT ? OPENSTACK_API_CLIENT : 'liberty'
- def openstackEnv = "${env.WORKSPACE}/venv"
-
- stage('Install OpenStack env') {
- openstack.setupOpenstackVirtualenv(openstackEnv, openstackVersion)
- }
-
- stage('Connect to OpenStack cloud') {
- openstackCloud = openstack.createOpenstackEnv(OPENSTACK_API_URL, OPENSTACK_API_CREDENTIALS, OPENSTACK_API_PROJECT)
- openstack.getKeystoneToken(openstackCloud, openstackEnv)
- }
-
- stage('Delete broken Heat stacks') {
- // get failed stacks
- def brokenStacks = []
- brokenStacks.addAll(openstack.getStacksWithStatus(openstackCloud, "CREATE_FAILED", openstackEnv))
- brokenStacks.addAll(openstack.getStacksWithStatus(openstackCloud, "DELETE_FAILED", openstackEnv))
- for(int i=0;i<brokenStacks.size();i++){
- common.infoMsg("Deleting Heat stack " + brokenStacks[i])
- openstack.deleteHeatStack(openstackCloud, brokenStacks[i], openstackEnv)
+ stage('Install OpenStack env') {
+ openstack.setupOpenstackVirtualenv(openstackEnv, openstackVersion)
}
- }
+ stage('Connect to OpenStack cloud') {
+ openstackCloud = openstack.createOpenstackEnv(OPENSTACK_API_URL, OPENSTACK_API_CREDENTIALS, OPENSTACK_API_PROJECT)
+ openstack.getKeystoneToken(openstackCloud, openstackEnv)
+ }
+
+ stage('Delete broken Heat stacks') {
+ // get failed stacks
+ def brokenStacks = []
+ brokenStacks.addAll(openstack.getStacksWithStatus(openstackCloud, "CREATE_FAILED", openstackEnv))
+ brokenStacks.addAll(openstack.getStacksWithStatus(openstackCloud, "DELETE_FAILED", openstackEnv))
+ for(int i=0;i<brokenStacks.size();i++){
+ common.infoMsg("Deleting Heat stack " + brokenStacks[i])
+ openstack.deleteHeatStack(openstackCloud, brokenStacks[i], openstackEnv)
+ }
+ }
+
+ }
}