X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-ci-jobs.yaml;h=b6397753cb216108d8afda0ba90db04a43581ba8;hb=d22d069117b64cee73be1165861013de9e79ab19;hp=733def52429ba301faf3c888c8d64e8a7e8bea18;hpb=64043e62f1c8ff53ff064cb832f2b68df4f08c43;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 733def52..b6397753 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -1239,6 +1239,10 @@ git-url: '$GIT_URL/$PROJECT' github-url: 'https://github.com' openstack-cloud: vex + openstack-image-cleanup: true + openstack-image-cleanup-age: 30 + openstack-image-protect: true + openstack-volume-cleanup: true stream: master submodule-timeout: 10 @@ -1283,7 +1287,25 @@ - lf-infra-pre-build - inject: properties-content: OS_CLOUD={openstack-cloud} - - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh + # Volumes + - conditional-step: + condition-kind: boolean-expression + condition-expression: '{openstack-volume-cleanup}' + steps: + - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh + # Images + - 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}' + steps: + - inject: + properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age} + - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh publishers: - lf-infra-publish