From: Jeremy Phelps Date: Wed, 13 Jun 2018 21:00:34 +0000 (+0000) Subject: Merge "Use include-regions to limit node build paths" X-Git-Tag: v0.21.0~6 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=e154622c6324f2b4a9db3970c074254649d5eaf3;hp=2bad748dc3aff06cb4971033eb4ce469b7cd38ec;p=releng%2Fglobal-jjb.git Merge "Use include-regions to limit node build paths" --- diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 668342a3..75efa862 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -53,22 +53,6 @@ - file-id: jjbini-sandbox target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini' -- lf_packer_file_paths: &lf_packer_file_paths - name: lf-packer-file-paths - file-paths: - - compare-type: ANT - pattern: 'packer/vars/{platforms}.json' - - compare-type: ANT - pattern: 'packer/templates/{templates}.json' - - compare-type: ANT - pattern: 'packer/provision/*.sh' - - compare-type: ANT - pattern: 'packer/provision/{templates}.yaml' - - compare-type: ANT - pattern: 'packer/provision/local-{templates}.yaml' - - compare-type: ANT - pattern: 'packer/provision/lib/**' - - lf_packer: &lf_packer_common name: lf-packer-common # Provide configuration common in packer jobs. @@ -143,16 +127,21 @@ submodule-recursive: true gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**/*.groovy' - - compare-type: ANT - pattern: '**/*.sh' - - compare-type: ANT - pattern: '**/*.yml' - - compare-type: ANT - pattern: '**/*.yaml' - - compare-type: ANT - pattern: '**/global-jjb' + - compare-type: REG_EXP + pattern: '.*\.groovy' + - compare-type: REG_EXP + pattern: '.*\.sh' + - compare-type: REG_EXP + pattern: '.*\.(yaml|yml)' + - compare-type: REG_EXP + pattern: '.*\/global-jjb' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*\.groovy' + - '.*\.sh' + - '.*\.(yaml|yml)' + - '.*\/global-jjb' ##################### # Job Configuration # @@ -293,8 +282,12 @@ comment-contains-value: remerge$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: 'jenkins-config/**' + - compare-type: REG_EXP + pattern: 'jenkins-config\/.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - 'jenkins-config\/.*' ##################### # Job Configuration # @@ -382,16 +375,17 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true status-context: 'Jenkins CFG Merge' permit-all: false github-hooks: true - github-org: '{github-org}' - github_pr_whitelist: '{obj:github_pr_whitelist}' - github_pr_admin_list: '{obj:github_pr_admin_list}' - + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + included-regions: '{obj:github_included_regions}' ################## # JJB DEPLOY JOB # @@ -494,17 +488,12 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^jjb-deploy (?!\*+$).+$' only-trigger-phrase: true status-context: 'JJB Deploy Job' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ############# # JJB Merge # @@ -570,6 +559,10 @@ # yamllint disable-line rule:key-duplicates <<: *lf_jjb_merge + ##################### + # Job Configuration # + ##################### + properties: - github: url: '{git-url}/{github-org}/{project}' @@ -587,15 +580,17 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true status-context: 'JJB Merge' permit-all: false github-hooks: true - github-org: '{github-org}' - github_pr_whitelist: '{obj:github_pr_whitelist}' - github_pr_admin_list: '{obj:github_pr_admin_list}' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + included-regions: '{obj:github_included_regions}' ############## # JJB Verify # @@ -640,8 +635,16 @@ # yamllint disable-line rule:key-duplicates <<: *lf_jjb_verify + ###################### + # Default parameters # + ###################### + git-url: '$GIT_URL/$GERRIT_PROJECT' + ##################### + # Job Configuration # + ##################### + scm: - lf-infra-gerrit-scm: git-url: '{git-url}' @@ -670,6 +673,10 @@ # yamllint disable-line rule:key-duplicates <<: *lf_jjb_verify + ##################### + # Job Configuration # + ##################### + properties: - github: url: '{git-url}/{github-org}/{project}' @@ -684,17 +691,13 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false status-context: 'JJB Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' ################ # Packer Merge # @@ -703,15 +706,6 @@ - lf_packer_merge: &lf_packer_merge name: lf-packer-merge - ###################### - # Default parameters # - ###################### - - gerrit_merge_triggers: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: remerge$ - ##################### # Job Configuration # ##################### @@ -733,8 +727,21 @@ # yamllint disable-line rule:key-duplicates <<: *lf_packer_merge + ###################### + # Default parameters # + ###################### + git-url: '$GIT_URL/$GERRIT_PROJECT' + gerrit_merge_triggers: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + + ##################### + # Job Configuration # + ##################### + scm: - lf-infra-gerrit-scm: git-url: '{git-url}' @@ -755,7 +762,17 @@ branches: - branch-compare-type: ANT branch-pattern: '**/{branch}' - <<: *lf_packer_file_paths + file-paths: + - compare-type: REG_EXP + pattern: 'packer\/provision\/.*\.sh' + - compare-type: REG_EXP + pattern: 'packer\/provision\/{templates}\.yaml' + - compare-type: REG_EXP + pattern: 'packer\/provision\/local-{templates}\.yaml' + - compare-type: REG_EXP + pattern: 'packer\/templates\/{templates}\.json' + - compare-type: REG_EXP + pattern: 'packer\/vars\/{platforms}\.json' - job-template: name: '{project-name}-packer-merge-{platforms}-{templates}' @@ -764,6 +781,10 @@ # yamllint disable-line rule:key-duplicates <<: *lf_packer_merge + ##################### + # Job Configuration # + ##################### + properties: - github: url: '{git-url}/{github-org}/{project}' @@ -782,15 +803,24 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true - status-context: 'Packer {platforms}-${templates} Merge' + status-context: 'Packer {platforms}-{templates} Merge' permit-all: false github-hooks: true - github-org: '{github-org}' - github_pr_whitelist: '{obj:github_pr_whitelist}' - github_pr_admin_list: '{obj:github_pr_admin_list}' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + # included-regions MUST match Gerrit Trigger file-paths + included-regions: + - 'packer\/provision\/.*\.sh' + - 'packer\/provision\/{templates}\.yaml' + - 'packer\/provision\/local-{templates}\.yaml' + - 'packer\/templates\/{templates}\.json' + - 'packer\/vars\/{platforms}\.json' ################# # Packer Verify # @@ -815,14 +845,12 @@ comment-contains-value: recheck$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: 'packer/vars/**.json' - - compare-type: ANT - pattern: 'packer/templates/**.json' - - compare-type: ANT - pattern: 'packer/provision/**.sh' - - compare-type: ANT - pattern: 'packer/provision/lib/**' + - compare-type: REG_EXP + pattern: 'packer\/.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - 'packer\/.*' ##################### # Job Configuration # @@ -842,8 +870,16 @@ # yamllint disable-line rule:key-duplicates <<: *lf_packer_verify + ###################### + # Default parameters # + ###################### + git-url: '$GIT_URL/$GERRIT_PROJECT' + ##################### + # Job Configuration # + ##################### + scm: - lf-infra-gerrit-scm: git-url: '{git-url}' @@ -872,6 +908,10 @@ # yamllint disable-line rule:key-duplicates <<: *lf_packer_verify + ##################### + # Job Configuration # + ##################### + properties: - github: url: '{git-url}/{github-org}/{project}' @@ -886,14 +926,10 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false status-context: 'Packer Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index ca948234..b1872a15 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -179,24 +179,6 @@ # Job Configuration # ##################### - triggers: - # Build weekly on Saturdays - - timed: 'H H * * 6' - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_clm_triggers}' - projects: - - project-compare-type: ANT - project-pattern: '{project}' - branches: - - branch-compare-type: ANT - branch-pattern: '**/{branch}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - builders: - lf-maven-install: mvn-version: '{mvn-version}' @@ -229,6 +211,24 @@ submodule-recursive: '{submodule-recursive}' choosing-strategy: default + triggers: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_clm_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + - job-template: name: '{project-name}-maven-clm-{stream}' id: github-maven-clm @@ -250,17 +250,18 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - github-pull-request: trigger-phrase: '^run-clm$' only-trigger-phrase: false status-context: 'CLM' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' ######################### # Maven Javadoc Publish # @@ -367,15 +368,16 @@ - github - pollscm: cron: '' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^remerge$' only-trigger-phrase: true - status-context: 'JJB Merge' + status-context: 'Maven Javadoc Publish' permit-all: false github-hooks: true - github-org: '{github-org}' - github_pr_whitelist: '{obj:github_pr_whitelist}' - github_pr_admin_list: '{obj:github_pr_admin_list}' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' ######################## # Maven Javadoc Verify # @@ -477,17 +479,12 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^recheck$' - only-trigger-phrase: true - status-context: 'Maven Javadoc' + only-trigger-phrase: false + status-context: 'Maven Javadoc Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ############### # Maven Merge # @@ -522,8 +519,12 @@ comment-contains-value: remerge$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' post_build_trigger: '' @@ -610,17 +611,20 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github + - pollscm: + cron: '' + - github-pull-request: trigger-phrase: '^remerge$' - only-trigger-phrase: false + only-trigger-phrase: true status-context: 'Maven Merge' - permit-all: true + permit-all: false github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + included-regions: '{obj:github_included_regions}' ################# # Maven Release # @@ -724,17 +728,12 @@ triggers: - timed: '{obj:cron}' - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^build release$' only-trigger-phrase: true status-context: 'Maven Release' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ############### # Maven Sonar # @@ -878,17 +877,12 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: - trigger-phrase: '^recheck$' + - github-pull-request: + trigger-phrase: '^run-sonar$' only-trigger-phrase: false - status-context: 'Maven Verify' + status-context: 'Maven Sonar' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' ################ # Maven Verify # @@ -924,8 +918,12 @@ - comment-added-contains-event: comment-contains-value: recheck$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' ##################### # Job Configuration # @@ -1002,17 +1000,13 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false status-context: 'Maven Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' ############################# # Maven Verify Dependencies # diff --git a/jjb/lf-python-jobs.yaml b/jjb/lf-python-jobs.yaml index 680228ab..a647d9e4 100644 --- a/jjb/lf-python-jobs.yaml +++ b/jjb/lf-python-jobs.yaml @@ -51,7 +51,6 @@ archive-artifacts: > **/*.log - nexus-iq-cli-version: 1.44.0-01 ##################### # Job Configuration # @@ -95,16 +94,18 @@ build-timeout: 60 git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 + nexus-iq-cli-version: 1.44.0-01 staging-profile-id: '' # Unused in this job stream: master submodule-recursive: true - gerrit_clm_triggers: - - comment-added-contains-event: - comment-contains-value: run-clm$ gerrit_trigger_file_paths: - compare-type: ANT - pattern: '**' + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' ##################### # Job Configuration # @@ -121,24 +122,6 @@ default: '{nexus-iq-cli-version}' description: Nexus IQ CLI package to download and use. - triggers: - # Build weekly on Saturdays - - timed: 'H H * * 6' - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_clm_triggers}' - projects: - - project-compare-type: ANT - project-pattern: '{project}' - branches: - - branch-compare-type: ANT - branch-pattern: '**/{branch}' - file-paths: '{obj:gerrit_trigger_file_paths}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true wrappers: - credentials-binding: - username-password-separated: @@ -158,6 +141,18 @@ # yamllint disable-line rule:key-duplicates <<: *lf_python_xc_clm + ###################### + # Default parameters # + ###################### + + gerrit_clm_triggers: + - comment-added-contains-event: + comment-contains-value: run-clm$ + + ##################### + # Job Configuration # + ##################### + scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -167,6 +162,25 @@ submodule-recursive: '{submodule-recursive}' choosing-strategy: default + triggers: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_clm_triggers}' + projects: + - project-compare-type: ANT + project-pattern: '{project}' + branches: + - branch-compare-type: ANT + branch-pattern: '**/{branch}' + file-paths: '{obj:gerrit_trigger_file_paths}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + - job-template: name: '{project-name}-python-clm-{stream}' id: github-python-xc-clm @@ -188,17 +202,15 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + # Build weekly on Saturdays + - timed: 'H H * * 6' + - github-pull-request: trigger-phrase: '^run-clm$' only-trigger-phrase: false status-context: 'CLM' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' ######################## # Python Sonar with Tox # @@ -225,12 +237,13 @@ stream: master submodule-recursive: true - gerrit_sonar_triggers: - - comment-added-contains-event: - comment-contains-value: run-sonar$ gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' ##################### # Job Configuration # @@ -261,24 +274,6 @@ however to use a specific version of the sonar-maven-plugin we can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar". - triggers: - - timed: '{obj:cron}' - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_sonar_triggers}' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/master' - file-paths: '{obj:gerrit_trigger_file_paths}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - builders: - shell: !include-raw-escape: # Workaround issue where the tox run later breaks the lftools virtualenv. @@ -322,6 +317,18 @@ # yamllint disable-line rule:key-duplicates <<: *lf_tox_sonar + ###################### + # Default parameters # + ###################### + + gerrit_sonar_triggers: + - comment-added-contains-event: + comment-contains-value: run-sonar$ + + ##################### + # Job Configuration # + ##################### + scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -331,6 +338,24 @@ submodule-recursive: '{submodule-recursive}' choosing-strategy: default + triggers: + - timed: '{obj:cron}' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_sonar_triggers}' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: '{obj:gerrit_trigger_file_paths}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + - job-template: name: '{project-name}-tox-sonar' id: github-tox-sonar @@ -352,17 +377,13 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^run-sonar$' only-trigger-phrase: false status-context: 'Python Sonar' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' ############## # Tox Verify # @@ -379,12 +400,21 @@ build-days-to-keep: 7 build-timeout: 15 git-url: '$GIT_URL/$GERRIT_PROJECT' + parallel: true python-version: python2 stream: master submodule-recursive: true tox-dir: '' tox-envs: '' + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: '.*' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*' + ##################### # Job Configuration # ##################### @@ -443,11 +473,6 @@ - draft-published-event - comment-added-contains-event: comment-contains-value: recheck$ - gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' - - parallel: true ##################### # Job Configuration # @@ -504,7 +529,7 @@ - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false - status-context: 'JJB Verify' + status-context: 'Tox Verify' permit-all: true github-hooks: true - auto-close-on-fail: false + included-regions: '{obj:github_included_regions}' diff --git a/jjb/lf-rtd-jobs.yaml b/jjb/lf-rtd-jobs.yaml index 2b7ae8a7..3c21dbc5 100644 --- a/jjb/lf-rtd-jobs.yaml +++ b/jjb/lf-rtd-jobs.yaml @@ -25,10 +25,21 @@ ###################### gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**/*.rst' - - compare-type: ANT - pattern: '**/conf.py' + - compare-type: REG_EXP + pattern: '.*\.css' + - compare-type: REG_EXP + pattern: '.*\.html' + - compare-type: REG_EXP + pattern: '.*\.rst' + - compare-type: REG_EXP + pattern: '.*\/conf.py' + + # github_included_regions MUST match gerrit_trigger_file_paths + github_included_regions: + - '.*\.css' + - '.*\.html' + - '.*\.rst' + - '.*\/conf.py' ##################### # Job Configuration # @@ -121,18 +132,21 @@ url: '{git-url}/{github-org}/{project}' triggers: - - lf-infra-github-pr-trigger: + - timed: 'H H * * *' + - github + - pollscm: + cron: '' + - github-pull-request: trigger-phrase: '^remerge$' - only-trigger-phrase: false + only-trigger-phrase: true status-context: 'RTD Merge' - permit-all: true + permit-all: false github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' - - timed: 'H H * * *' + org-list: + - '{github-org}' + white-list: '{obj:github_pr_whitelist}' + admin-list: '{obj:github_pr_admin_list}' + included-regions: '{obj:github_included_regions}' ############# # RTD VERIFY# @@ -222,14 +236,10 @@ jenkins-ssh-credential: '{jenkins-ssh-credential}' triggers: - - lf-infra-github-pr-trigger: + - github-pull-request: trigger-phrase: '^recheck$' only-trigger-phrase: false status-context: 'RTD Verify' permit-all: true github-hooks: true - github-org: '' - github_pr_whitelist: - - '' - github_pr_admin_list: - - '' + included-regions: '{obj:github_included_regions}' diff --git a/shell/package-listing.sh b/shell/package-listing.sh index 0c35917e..b2afe33a 100644 --- a/shell/package-listing.sh +++ b/shell/package-listing.sh @@ -18,18 +18,19 @@ set -x # Trace commands for this script to make debugging easier OS_FAMILY=$(facter osfamily | tr '[:upper:]' '[:lower:]') +# Capture the CI WORKSPACE safely in the case that it doesn't exist +workspace="${WORKSPACE:-}" + START_PACKAGES=/tmp/packages_start.txt END_PACKAGES=/tmp/packages_end.txt DIFF_PACKAGES=/tmp/packages_diff.txt -# This script may be run during system boot, if that is true then there will be -# a starting_packages file. We will want to create a diff if we have a starting -# packages file +# Swap to creating END_PACKAGES if we are running in a CI job (determined by if +# we have a workspace env) or if the starting packages listing already exists. PACKAGES="${START_PACKAGES}" -if [ -f "${PACKAGES}" ] +if ( [ "${workspace}" ] || [ -f "${START_PACKAGES}" ] ) then PACKAGES="${END_PACKAGES}" - CREATEDIFF=1 fi case "${OS_FAMILY}" in @@ -46,15 +47,15 @@ case "${OS_FAMILY}" in ;; esac -if [ "${CREATEDIFF}" ] +if ( [ -f "${START_PACKAGES}" ] && [ -f "${END_PACKAGES}" ] ) then diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}" fi # If running in a Jenkins job, then copy the created files to the archives # location -if [ "${WORKSPACE}" ] +if [ "${workspace}" ] then - mkdir -p "${WORKSPACE}/archives/" - cp -f /tmp/packages_*.txt "${WORKSPACE}/archives/" + mkdir -p "${workspace}/archives/" + cp -f /tmp/packages_*.txt "${workspace}/archives/" fi