From: Thanh Ha Date: Wed, 7 Nov 2018 20:22:55 +0000 (+0800) Subject: Allow image protection script to be disabled X-Git-Tag: v0.27.0~7^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=e35f8aa01680e9a8e86f0a9fc3091a8007a8ed21;p=releng%2Fglobal-jjb.git Allow image protection script to be disabled Change-Id: Ie15fc59fba1a4efc475136bf30ed4c94045203d2 Signed-off-by: Thanh Ha --- diff --git a/.jjb-test/lf-ci-jobs/openstack-cron-full.yaml b/.jjb-test/lf-ci-jobs/openstack-cron-full.yaml index d4bc05c9..0dc4aaaa 100644 --- a/.jjb-test/lf-ci-jobs/openstack-cron-full.yaml +++ b/.jjb-test/lf-ci-jobs/openstack-cron-full.yaml @@ -8,3 +8,4 @@ openstack-cloud: example-cloud openstack-image-cleanup: false openstack-image-cleanup-age: 42 + openstack-image-protect: false diff --git a/docs/jjb/lf-ci-jobs.rst b/docs/jjb/lf-ci-jobs.rst index f7686349..57aebc6a 100644 --- a/docs/jjb/lf-ci-jobs.rst +++ b/docs/jjb/lf-ci-jobs.rst @@ -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. diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 217879e0..2ede3e7b 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -1241,6 +1241,7 @@ openstack-cloud: vex openstack-image-cleanup: true openstack-image-cleanup-age: 30 + openstack-image-protect: true stream: master submodule-timeout: 10 @@ -1286,7 +1287,11 @@ - 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}'