Merge "Add job to verify upstream global-jjb patches"
[releng/global-jjb.git] / jjb / lf-ci-jobs.yaml
index 5532a3e..3ebe6a3 100644 (file)
           white-list-target-branches:
             - '{branch}'
 
+############################
+# JJB Verify Upstream GJJB #
+############################
+
+- lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
+    name: lf-jjb-verify-upstream-gjjb
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    concurrent: true
+
+    builders:
+      - shell: |
+          cd jjb/global-jjb
+          git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
+          git cherry-pick FETCH_HEAD
+      - lf-infra-jjbini
+      - shell: !include-raw-escape:
+          - ../shell/git-validate-jira-urls.sh
+          - ../shell/jjb-install.sh
+          - ../shell/jjb-verify-job.sh
+          - ../shell/jjb-check-unicode.sh
+          - ../shell/jjb-cleanup.sh
+      - lf-infra-gpg-verify-git-signature
+
+- job-template:
+    name: '{project-name}-jjb-verify-upstream-gjjb'
+    id: gerrit-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'
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '{git-url}'
+          refspec: ''
+          branch: 'master'
+          submodule-recursive: true
+          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[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
+          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
+
 #################
 # License Check #
 #################