Delete stack upon completion
[infra/cicd.git] / jjb / engine / engine-verify-jobs / engine-verify-online-deploy-test.yaml
index c295c788cf5dd7c6e9d33ec5cdbb44ca5cb9b77a..7f3b903140b5d6c3158f5d22e1637ee10acf7b9e 100644 (file)
           description: 'Name of heat-environment file to use.'
       - string:
           name: STACK_NAME
-          default: "nordix-cicd-verify-engine-online-{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-online-engine-{distro}-$BUILD_NUMBER"
+          default: "keypair-nordix-cicd-verify-online-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-online-{phase}-{distro}-{cloud}-{type}-{stream}'