Improve upstream gjjb jobs, add Github version 06/64206/2
authorEric Ball <eball@linuxfoundation.org>
Thu, 4 Jun 2020 20:37:28 +0000 (13:37 -0700)
committerEric Ball <eball@linuxfoundation.org>
Thu, 4 Jun 2020 20:47:43 +0000 (13:47 -0700)
ODL already has the upstream LF Gerrit in its Gerrit triggers, and it
is named "lf-releng". This should therefore be used as the standard
name for other projects.

Added a Github version of the upstream global-jjb verify, which just
needs SCM changes for pulling in its ci-man repo.

Documentation for preparing a Jenkins server to test upstream gjjb
changes is available here: https://confluence.linuxfoundation.org/display/RELEN/Add+upstream+global-jjb+testing+to+Jenkins

Issue: RELENG-1043
Change-Id: I0a2f757c0e58355bc59eaa1e56eaa396f60b0f32
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
docs/jjb/lf-ci-jobs.rst
jjb/lf-ci-jobs.yaml
releasenotes/notes/improve-upstream-gjjb-836952adce2508c3.yaml [new file with mode: 0644]

index 1ec5485..116de87 100644 (file)
@@ -508,6 +508,7 @@ project level jobs.
 :Template Names:
     - {project-name}-jjb-verify-upstream-gjjb
     - gerrit-jjb-verify-upstream-gjjb
+    - github-jjb-verify-upstream-gjjb
 
 :Comment Trigger: recheck|reverify
 
index cc0b2d5..9c62d97 100644 (file)
       - lf-infra-jjbini
       - shell: !include-raw-escape:
           - ../shell/jjb-verify-job.sh
-      - lf-infra-gpg-verify-git-signature
+
+    # All jobs are triggering from the same source
+    triggers:
+      - gerrit:
+          server-name: "lf-releng"
+          trigger-on:
+            - 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*$'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: "releng/global-jjb"
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: "**/master"
+          override-votes: true
+          gerrit-build-failed-codereview-value: -1
+          gerrit-build-failed-verified-value: 0
+          gerrit-build-successful-codereview-value: 1
+          gerrit-build-successful-verified-value: 0
 
 - job-template:
     name: "{project-name}-jjb-verify-upstream-gjjb"
           choosing-strategy: default
           jenkins-ssh-credential: "{jenkins-ssh-credential}"
 
-    triggers:
-      - gerrit:
-          server-name: "LinuxFoundation"
-          trigger-on:
-            - 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*$'
-          projects:
-            - project-compare-type: ANT
-              project-pattern: "releng/global-jjb"
-              branches:
-                - branch-compare-type: ANT
-                  branch-pattern: "**/master"
-          override-votes: true
-          gerrit-build-failed-codereview-value: -1
-          gerrit-build-failed-verified-value: 0
-          gerrit-build-successful-codereview-value: 1
-          gerrit-build-successful-verified-value: 0
+- job-template:
+    name: "{project-name}-jjb-verify-upstream-gjjb"
+    id: github-jjb-verify-upstream-gjjb
+    <<: *lf_jjb_common
+    # yamllint disable-line rule:key-duplicates
+    <<: *lf_jjb_verify_upstream_gjjb
+
+    ######################
+    # Default parameters #
+    ######################
+
+    git-url: "$GIT_URL/$PROJECT"
+    submodule-timeout: 10
+    submodule-disable: false
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    properties:
+      - lf-infra-properties:
+          project: "{project}"
+          build-days-to-keep: 7
+      - 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: "{submodule-recursive}"
+          submodule-timeout: "{submodule-timeout}"
+          submodule-disable: "{submodule-disable}"
+          choosing-strategy: default
+          jenkins-ssh-credential: "{jenkins-ssh-credential}"
 
 #################
 # License Check #
diff --git a/releasenotes/notes/improve-upstream-gjjb-836952adce2508c3.yaml b/releasenotes/notes/improve-upstream-gjjb-836952adce2508c3.yaml
new file mode 100644 (file)
index 0000000..36b2270
--- /dev/null
@@ -0,0 +1,6 @@
+---
+features:
+  - |
+    verify-upstream-global-jjb jobs have been improved in two ways: the upstream
+    Gerrit name has been changed to lf-releng to match the precedent set by
+    OpenDaylight, and we have added a Github version of the job.