nsm: Differentiate status contexts in verify job and bugfix 93/8193/5
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 30 Mar 2021 08:49:50 +0000 (10:49 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 30 Mar 2021 13:43:17 +0000 (15:43 +0200)
The GitHub Pull Request Plugin publishes status messages to GitHub PR
for developers to see the results of verification. In previous job
configuration, status context was same for all jobs, overriding each
others status contexts and preventing to show statuses of different jobs.
This change uses different context based on what job does so the feedback
can be posted properly.

Example with same contexts: https://github.com/Nordix/Meridio/pull/1
Example with different contexts: https://github.com/Nordix/Meridio/pull/2

Auth ID was still wrong so that is fixed as well and a note is included
in jjb yaml to ensure it is not missed again.

Git SCM URL is also fixed in periodic job.

Change-Id: Iece387fec405b917ec1ae7b7704d4b85c79c45b4

jjb/nsm/nordix-nsm-meridio-periodic.yaml
jjb/nsm/nordix-nsm-meridio-verify.yaml

index 8c4b98f27b7849d7577d43c0a82cc9cbe9a1d571..556a15eb3d38469dff01525f3eace96e1dd6bbbc 100644 (file)
@@ -78,7 +78,7 @@
 
     scm:
       - git:
-          url: 'https://github.com/$PROJECT.git'
+          url: 'https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git'
           branches:
             - master
           timeout: 15
index 2e95baf0e4f65a5b3cc119b7b19f552afdfd090e..90e4ec3fa58f02d630bf182cda76209cc9484e50 100644 (file)
       - 'master':
           branch: '${{ghprbActualCommit}}'
 
+    # NOTE (fdegir): auth-id is taken from Jenkins Global Configuration
+    # by clicking Auth ID button for the desired GitHub Server API URL
+    # Please ensure you are looking at GitHub Pull Request Builder part
+    # of global configuration and not to GitHub Server configuration
+    ghprb-auth-id: 'cdfd2452-a9e2-41a3-8ee6-9058512b4aff'
     image-name:
       - ctraffic
       - ipam
             - uablrek
             - LionelJouin
             - fdegir
-          auth-id: 'nordix-nsm-ci'
+          auth-id: '{ghprb-auth-id}'
           github-hooks: true
           permit-all: true
           trigger-phrase: '/reverify'
           only-trigger-phrase: false
           cron: 'H/5 * * * *'
-          status-context: 'Nordix Jenkins'
+          status-context: 'Nordix Jenkins Static Analysis'
 
     builders:
       - shell:
             - uablrek
             - LionelJouin
             - fdegir
-          auth-id: 'nordix-nsm-ci'
+          auth-id: '{ghprb-auth-id}'
           github-hooks: true
           permit-all: true
           trigger-phrase: '/reverify'
           only-trigger-phrase: false
           cron: 'H/5 * * * *'
-          status-context: 'Nordix Jenkins'
+          status-context: 'Nordix Jenkins Image Build: {image-name}'
 
     wrappers:
       - build-timeout: