Add self release jobs for GitHub 68/66568/6
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 20 Jan 2021 21:55:55 +0000 (13:55 -0800)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 26 Jan 2021 17:41:21 +0000 (09:41 -0800)
Add self release support for GitHub based
repos.

Issue: RELENG-3366
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: I84e56c8f63459bf0ecd69f6521a580383df1d6fd

docs/jjb/lf-release-jobs.rst
jjb/lf-release-job-groups.yaml
jjb/lf-release-jobs.yaml
releasenotes/notes/add-self-release-github-jobs-263bd060310209ea.yaml [new file with mode: 0644]

index dd8b811..f872808 100644 (file)
@@ -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
 ------------
 
index a1451b0..b2d09d6 100644 (file)
@@ -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
index 3cc37e9..e1bf068 100644 (file)
@@ -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 #
     #####################
             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 #
 #################
       - comment-added-contains-event:
           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
 
+    github_included_regions:
+      - '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
+
     #####################
     # Job Configuration #
     #####################
                 - 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 (file)
index 0000000..552a63c
--- /dev/null
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    Add self release verify and merge jobs for GitHub based projects.