X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-ci-jobs.yaml;h=f0972607bd692bb06f78969ee11beca6ab0e2d78;hb=e20b15582fcad2d7ac73e310bdab8a6c7db55025;hp=217879e07a9ffd98e74cc0dad7a7f8412db75dc9;hpb=af8e2b4d31bbeae125bd09290acd0b55fa6ff7a7;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 217879e0..f0972607 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,7 +101,8 @@ build-timeout: 10 disable-job: false github-url: 'https://github.com' - jjb-version: 2.2.1 + jjb-cache: '$HOME/.cache/jenkins_jobs' + jjb-version: 2.8.0 stream: master submodule-recursive: true submodule-timeout: 10 @@ -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,13 +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 @@ -1263,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: @@ -1285,8 +1301,30 @@ - lf-infra-pre-build - inject: properties-content: OS_CLOUD={openstack-cloud} + # 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 - - 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}' @@ -1444,8 +1482,10 @@ scm: - lf-infra-github-scm: url: '{git-clone-url}{github-org}/{project}' - refspec: '' - branch: 'refs/heads/{branch}' + refspec: > + +refs/heads/*:refs/remotes/origin/* + +refs/pull/*:refs/remotes/origin/pr/* + branch: '$GERRIT_REFSPEC' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' choosing-strategy: default