Delete stack upon completion
[infra/cicd.git] / jjb / engine / engine-verify-jobs / engine-verify-offline-deploy-test.yaml
index 027657aa8a960f6a1ed392dfe7194eb054708c1f..8ed343ab75b98e4e9d16e4e47024b3c2bac5132b 100644 (file)
           description: 'Name of heat-environment file to use.'
       - string:
           name: STACK_NAME
-          default: "nordix-cicd-verify-engine-offline-{distro}-$BUILD_NUMBER"
+          default: "nordix-cicd-verify-engine-online-{distro}-$GERRIT_CHANGE_NUMBER"
           description: 'Name of the created stack'
       - string:
           name: KEYPAIR_NAME
-          default: "keypair-nordix-cicd-verify-offline-engine-{distro}-$BUILD_NUMBER"
+          default: "keypair-nordix-cicd-verify-offline-engine-{distro}-$GERRIT_CHANGE_NUMBER"
           description: 'Name of the created keypair'
       - string:
           name: USE_PREBUILT_DEPLOYMENT_IMAGE
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: false
-      - conditional-step:
-          condition-kind: and
-          condition-operands:
-            - condition-kind: strings-match
-              condition-string1: $DELETE_STACK
-              condition-string2: true
-            - condition-kind: strings-match
-              condition-string1: $PROVISIONER_TYPE
-              condition-string2: heat
-          on-evaluation-failure: dont-run
-          steps:
-            - 'engine-delete-stack-macro'
+
+    publishers:
+      - postbuildscript:
+          builders:
+            - role: SLAVE
+              build-on:
+                - SUCCESS
+                - FAILURE
+                - ABORTED
+                - NOT_BUILT
+                - UNSTABLE
+              build-steps:
+                - 'engine-wait-pkg-mgr-macro'
+                - 'engine-delete-stack-macro'
 
 - job-template:
     name: 'engine-verify-offline-{phase}-{distro}-{cloud}-{type}-{stream}'