From: Jessica Wagantall Date: Wed, 20 Jan 2021 21:55:55 +0000 (-0800) Subject: Add self release jobs for GitHub X-Git-Tag: v0.61.0~11 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=146cde6436b5e8dcac578be231cc6fb55b87772c;p=releng%2Fglobal-jjb.git Add self release jobs for GitHub Add self release support for GitHub based repos. Issue: RELENG-3366 Signed-off-by: Jessica Wagantall Change-Id: I84e56c8f63459bf0ecd69f6521a580383df1d6fd --- diff --git a/docs/jjb/lf-release-jobs.rst b/docs/jjb/lf-release-jobs.rst index dd8b811d..f872808b 100644 --- a/docs/jjb/lf-release-jobs.rst +++ b/docs/jjb/lf-release-jobs.rst @@ -253,6 +253,15 @@ The JSON schema for a PackageCloud release file appears below. :language: yaml +Job Groups +========== + +Below is a list of Release job groups: + +.. literalinclude:: ../../jjb/lf-release-job-groups.yaml + :language: yaml + + Jenkins Jobs ------------ diff --git a/jjb/lf-release-job-groups.yaml b/jjb/lf-release-job-groups.yaml index a1451b0d..b2d09d6e 100644 --- a/jjb/lf-release-job-groups.yaml +++ b/jjb/lf-release-job-groups.yaml @@ -8,3 +8,13 @@ jobs: - gerrit-release-verify - gerrit-release-merge + +- job-group: + name: "{project-name}-github-release-jobs" + + # This job group contains all the recommended jobs that should be deployed + # for any project using self releases. + + jobs: + - github-release-verify + - github-release-merge diff --git a/jjb/lf-release-jobs.yaml b/jjb/lf-release-jobs.yaml index 3cc37e9b..e1bf0684 100644 --- a/jjb/lf-release-jobs.yaml +++ b/jjb/lf-release-jobs.yaml @@ -56,6 +56,9 @@ # yamllint disable-line rule:line-length comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$' + github_included_regions: + - '(releases\/.*\.yaml|\.releases\/.*\.yaml)' + ##################### # Job Configuration # ##################### @@ -138,6 +141,46 @@ unstable: "{gerrit-skip-vote}" notbuilt: "{gerrit-skip-vote}" +- job-template: + name: "{project-name}-release-verify" + id: github-release-verify + <<: *lf_release_common + # yamllint disable-line rule:key-duplicates + <<: *lf_release_verify + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + - github: + url: "{github-url}/{github-org}/{project}" + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + scm: + - lf-infra-github-scm: + url: "{git-clone-url}{github-org}/{project}" + refspec: "+refs/pull/*:refs/remotes/origin/pr/*" + branch: "$sha1" + submodule-recursive: "{submodule-recursive}" + 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: "Github Release Verify" + permit-all: true + github-hooks: true + white-list-target-branches: + - "{branch}" + included-regions: "{obj:github_included_regions}" + ################# # RELEASE MERGE # ################# @@ -160,6 +203,9 @@ - comment-added-contains-event: comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$' + github_included_regions: + - '(releases\/.*\.yaml|\.releases\/.*\.yaml)' + ##################### # Job Configuration # ##################### @@ -248,6 +294,46 @@ - compare-type: REG_EXP pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)' +- job-template: + name: "{project-name}-release-merge" + id: github-release-merge + <<: *lf_release_common + # yamllint disable-line rule:key-duplicates + <<: *lf_release_merge + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + - github: + url: "{github-url}/{github-org}/{project}" + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + scm: + - lf-infra-github-scm: + url: "{git-clone-url}{github-org}/{project}" + refspec: "+refs/pull/*:refs/remotes/origin/pr/*" + branch: "$sha1" + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: "{submodule-disable}" + choosing-strategy: default + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + triggers: + - github-pull-request: + trigger-phrase: "^remerge$" + only-trigger-phrase: true + status-context: "Github Release Merge" + permit-all: true + github-hooks: true + white-list-target-branches: + - "{branch}" + included-regions: "{obj:github_included_regions}" + ################ # PyPI RELEASE # ################ diff --git a/releasenotes/notes/add-self-release-github-jobs-263bd060310209ea.yaml b/releasenotes/notes/add-self-release-github-jobs-263bd060310209ea.yaml new file mode 100644 index 00000000..552a63cc --- /dev/null +++ b/releasenotes/notes/add-self-release-github-jobs-263bd060310209ea.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Add self release verify and merge jobs for GitHub based projects.