X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-ci-jobs.yaml;h=620783fc89a35890e0de8f34cb4d4909925d9711;hb=5ad51158bb7a1de7325f9fa8eb7f187075d06007;hp=733def52429ba301faf3c888c8d64e8a7e8bea18;hpb=3b9dcb2903e5cdc7740f59e44e4d6faf4e099b51;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 733def52..620783fc 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -77,6 +77,10 @@ name: JJB_VERSION default: '{jjb-version}' description: Jenkins Job Builder version to download and install. + - string: + name: XDG_CACHE_HOME + default: '{jjb-cache}' + description: Jenkins Job Builder cache location. - parameter: name: lf-packer-parameters @@ -97,6 +101,7 @@ build-timeout: 10 disable-job: false github-url: 'https://github.com' + jjb-cache: '$HOME/.cache/jenkins_jobs' jjb-version: 2.2.1 stream: master submodule-recursive: true @@ -136,6 +141,7 @@ branch: '{branch}' lftools-version: '{lftools-version}' - lf-infra-jjb-parameters: + jjb-cache: '{jjb-cache}' jjb-version: '{jjb-version}' wrappers: @@ -540,6 +546,7 @@ parameters: - lf-infra-jjb-parameters: + jjb-cache: '{jjb-cache}' jjb-version: '{jjb-version}' triggers: @@ -1234,11 +1241,17 @@ branch: master build-days-to-keep: 7 build-timeout: 10 - cron: '@daily' + cron: '@hourly' disable-job: false 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-server-cleanup: true + openstack-stack-cleanup: true + openstack-volume-cleanup: true stream: master submodule-timeout: 10 @@ -1261,6 +1274,11 @@ stream: '{stream}' branch: '{branch}' lftools-version: '{lftools-version}' + - string: + name: JENKINS_URLS + default: '{jenkins-urls}' + description: | + Space separated list of Jenkins URLs to check for active builds. wrappers: - lf-infra-wrappers: @@ -1283,7 +1301,37 @@ - lf-infra-pre-build - inject: properties-content: OS_CLOUD={openstack-cloud} - - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh + # Stacks + - conditional-step: + condition-kind: boolean-expression + condition-expression: '{openstack-stack-cleanup}' + steps: + - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh + # Servers + - conditional-step: + condition-kind: boolean-expression + condition-expression: '{openstack-server-cleanup}' + steps: + - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.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