Make delete-stack a postbuild step 19/2019/2
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 22 Aug 2019 20:17:30 +0000 (20:17 +0000)
committerFatih Degirmenci <fdegir@gmail.com>
Thu, 22 Aug 2019 20:19:57 +0000 (20:19 +0000)
Failed builds leave stack behind them unnecessarily so
delete-stack is turned into a postbuild step to run always
to remove the stack.

Change-Id: Iab6aa3730729be28853ccac3b8ac3f1614465902

jjb/cloud-infra/cloud-infra-periodic-onap.yaml
jjb/cloud-infra/delete-heat-stack.sh [moved from jjb/cloud-infra/delete-stack.sh with 100% similarity]
jjb/cloud-infra/onap-macros.yaml

index f1996122b2afbdc4ceb12be1bb69d996c863f30b..71209df05af8f1b727dbba50ce48404f69bd2113 100644 (file)
 # ============LICENSE_END=========================================================
 
 #--------------------------------------------------------------------------------------
 # ============LICENSE_END=========================================================
 
 #--------------------------------------------------------------------------------------
-# The jobs declared in this JJB configuration file are used for verifying cloud-infra
-# engine from the tip of the master branch periodically to check the stability of it.
-#
-# These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
-# The slaves have
-#   - Ubuntu1604 as the base distro
-#   - nested virtualization
-#   - internet access
-#   - passwordless sudo
-#   - 16 CPUs/32GB RAM/200 GB Disk
-#   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
-#     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
-#
-# The slaves should not have a cloud infra scenario deployed on them.
+# The jobs declared in this JJB configuration file are used for deploying and testing
+# ONAP scenario onap-nofeature-noha.
 #--------------------------------------------------------------------------------------
 
 - project:
 #--------------------------------------------------------------------------------------
 
 - project:
@@ -78,8 +66,6 @@
           test-type: oom-healthcheck
       - promote-onap:
           build-timeout: 5
           test-type: oom-healthcheck
       - promote-onap:
           build-timeout: 5
-      - delete-stack:
-          build-timeout: 5
 
     onap-healthcheck-phases:
       - onap-healthcheck-core:
 
     onap-healthcheck-phases:
       - onap-healthcheck-core:
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
-      - multijob:
-          name: Delete Stack
-          condition: ALWAYS
-          projects:
-            - name: 'delete-stack-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-              current-parameters: false
-              predefined-parameters: |
-                DISTRO=$DISTRO
-                DEPLOY_TYPE=$DEPLOY_TYPE
-                INSTALLER_TYPE=$INSTALLER_TYPE
-                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-                ONAP_VERSION=$ONAP_VERSION
-                ONAP_FLAVOR=$ONAP_FLAVOR
-                ENGINE_VERSION=$ENGINE_VERSION
-                ENGINE_REFSPEC=$ENGINE_REFSPEC
-                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
-                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
-                XTESTING_REPO_URL=$XTESTING_REPO_URL
-                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
-              node-parameters: true
-              kill-phase-on: NEVER
-              abort-all-job: false
+
+    publishers:
+      - postbuildscript:
+          builders:
+            - role: SLAVE
+              build-on:
+                - SUCCESS
+                - FAILURE
+                - ABORTED
+                - NOT_BUILT
+                - UNSTABLE
+              build-steps:
+                - shell:
+                    !include-raw: ./delete-heat-stack.sh
 
 - job-template:
     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
 
 - job-template:
     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
index 12795bdf95236bd645b3c36c7077b051660c79d4..291d7f59b05b9c9ec0c1524dcced6b973837b835 100644 (file)
       - shell:
           !include-raw: ./promote-onap.sh
 
       - shell:
           !include-raw: ./promote-onap.sh
 
-- builder:
-    name: 'delete-stack-macro'
-    builders:
-      - shell:
-          !include-raw: ./delete-stack.sh
-
 # vim: set ts=2 sw=2 expandtab:
 # vim: set ts=2 sw=2 expandtab: