+ - "{github-org}"
+ white-list: "{obj:github_pr_whitelist}"
+ admin-list: "{obj:github_pr_admin_list}"
+ included-regions: "{obj:github_included_regions}"
+ white-list-target-branches:
+ - "{branch}"
+
+###########################################
+# Jenkins Configuration Management Verify #
+###########################################
+
+- lf_jenkins_configuration: &lf_jenkins_cfg_verify
+ name: lf-jenkins-cfg-verify
+
+ ######################
+ # Default parameters #
+ ######################
+
+ branch: master
+ build-days-to-keep: 7
+ disable-job: false
+ git-url: "$GIT_URL/$GERRIT_PROJECT"
+ github-url: "https://github.com"
+ openstack-cloud: vex
+ submodule-timeout: 10
+ submodule-disable: false
+
+ gerrit_verify_triggers:
+ - patchset-created-event:
+ exclude-drafts: true
+ exclude-trivial-rebase: false
+ exclude-no-code-change: false
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
+
+ gerrit_trigger_file_paths:
+ - compare-type: REG_EXP
+ pattern: 'jenkins-config\/.*'
+
+ # github_included_regions MUST match gerrit_trigger_file_paths
+ github_included_regions:
+ - 'jenkins-config\/.*'
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ project-type: freestyle
+ node: "{build-node}"
+ concurrent: true
+ disabled: "{disable-job}"
+
+ properties:
+ - lf-infra-properties:
+ project: "{project}"
+ build-days-to-keep: 1
+
+ parameters:
+ - lf-infra-parameters:
+ project: "{project}"
+ stream: ""
+ branch: master
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: 10
+ jenkins-ssh-credential: "{jenkins-ssh-credential}"
+ - config-file-provider:
+ # Listed after to override openstack-infra-wrappers clouds.yaml
+ # definition
+ files:
+ - file-id: clouds-yaml
+ target: "$HOME/.config/openstack/clouds.yaml"
+ - file-id: npmrc
+ target: "$HOME/.npmrc"
+ - file-id: pipconf
+ target: "$HOME/.config/pip/pip.conf"
+
+ builders:
+ - lf-infra-pre-build
+ - inject:
+ properties-content: OS_CLOUD={openstack-cloud}
+ - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
+
+ publishers:
+ - lf-infra-publish
+
+- job-template:
+ name: "{project-name}-jenkins-cfg-verify"
+ id: gerrit-jenkins-cfg-verify
+ <<: *lf_jenkins_cfg_verify
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: "{git-url}"
+ refspec: "$GERRIT_REFSPEC"
+ branch: "$GERRIT_BRANCH"
+ submodule-recursive: true
+ submodule-timeout: "{submodule-timeout}"
+ submodule-disable: "{submodule-disable}"
+ choosing-strategy: gerrit
+ jenkins-ssh-credential: "{jenkins-ssh-credential}"
+
+ triggers:
+ - gerrit:
+ server-name: "{gerrit-server-name}"
+ trigger-on: "{obj:gerrit_verify_triggers}"
+ projects:
+ - project-compare-type: ANT
+ project-pattern: "{project}"
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: "**/{branch}"
+ file-paths: "{obj:gerrit_trigger_file_paths}"
+
+- job-template:
+ name: "{project-name}-jenkins-cfg-verify"
+ id: github-jenkins-cfg-verify
+ <<: *lf_jenkins_cfg_verify
+
+ properties:
+ - github:
+ url: "{github-url}/{github-org}/{project}"
+
+ scm:
+ - lf-infra-github-scm:
+ url: "{git-clone-url}{github-org}/{project}"
+ refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
+ branch: "$sha1"
+ submodule-recursive: true
+ submodule-timeout: "{submodule-timeout}"
+ submodule-disable: "{submodule-disable}"
+ choosing-strategy: default
+ jenkins-ssh-credential: "{jenkins-ssh-credential}"
+
+ triggers:
+ - github-pull-request:
+ trigger-phrase: "^(recheck|reverify)$"
+ only-trigger-phrase: false
+ status-context: "Jenkins CFG Verify"
+ permit-all: true
+ github-hooks: true
+ included-regions: "{obj:github_included_regions}"
+ white-list-target-branches:
+ - "{branch}"
+
+###########################
+# JENKINS SANDBOX CLEANUP #
+###########################
+
+- lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
+ name: lf-jenkins-sandbox-cleanup
+
+ ######################
+ # Default parameters #
+ ######################
+
+ build-timeout: 30
+ # Run every Saturday at 08:00 UTC
+ cron: "0 8 * * 6"
+ disable-job: false
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ project-type: freestyle
+ node: "{build-node}"
+ concurrent: true
+ disabled: "{disable-job}"
+
+ parameters:
+ - lf-infra-jjb-parameters:
+ jjb-cache: "{jjb-cache}"
+ jjb-version: "{jjb-version}"
+
+ triggers:
+ - timed: "{obj:cron}"
+
+ builders:
+ - lf-infra-jjbini
+ - shell: !include-raw-escape:
+ - ../shell/jjb-install.sh
+ - ../shell/jenkins-sandbox-cleanup.sh
+ - ../shell/jjb-cleanup.sh
+
+- job-template:
+ name: "{project-name}-jenkins-sandbox-cleanup"
+ id: gerrit-jenkins-sandbox-cleanup
+ <<: *lf_jjb_common
+ # yamllint disable-line rule:key-duplicates
+ <<: *lf_jenkins_sandbox_cleanup
+
+- job-template:
+ name: "{project-name}-jenkins-sandbox-cleanup"
+ id: github-jenkins-sandbox-cleanup
+ <<: *lf_jjb_common
+ # yamllint disable-line rule:key-duplicates
+ <<: *lf_jenkins_sandbox_cleanup