Allow image protection script to be disabled 09/13409/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 7 Nov 2018 20:22:55 +0000 (04:22 +0800)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 7 Nov 2018 22:48:47 +0000 (06:48 +0800)
Change-Id: Ie15fc59fba1a4efc475136bf30ed4c94045203d2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.jjb-test/lf-ci-jobs/openstack-cron-full.yaml
docs/jjb/lf-ci-jobs.rst
jjb/lf-ci-jobs.yaml

index d4bc05c..0dc4aaa 100644 (file)
@@ -8,3 +8,4 @@
     openstack-cloud: example-cloud
     openstack-image-cleanup: false
     openstack-image-cleanup-age: 42
+    openstack-image-protect: false
index f768634..57aebc6 100644 (file)
@@ -574,6 +574,8 @@ containing the credentials for the cloud.
         (default: true)
     :openstack-image-cleanup-age: Age in days of image before marking it for
         removal. (default: 30)
+    :openstack-image-protect: Whether or not to run the image protect script.
+        (default: true)
     :stream: Keyword that can be used to represent a release code-name.
         Often the same as the branch. (default: master)
     :submodule-recursive: Whether to checkout submodules recursively.
index 217879e..2ede3e7 100644 (file)
     openstack-cloud: vex
     openstack-image-cleanup: true
     openstack-image-cleanup-age: 30
+    openstack-image-protect: true
     stream: master
     submodule-timeout: 10
 
       - inject:
           properties-content: OS_CLOUD={openstack-cloud}
       # Images
-      - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
+      - conditional-step:
+          condition-kind: boolean-expression
+          condition-expression: '{openstack-image-protect}'
+          steps:
+            - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
       - conditional-step:
           condition-kind: boolean-expression
           condition-expression: '{openstack-image-cleanup}'