Add jjb credentials to infra-jjb-verify
[infra/cicd.git] / jjb / global / jjb-macros.yaml
index cfe19edf2d938fec5c727acb1f0c98ea8bef85af..e4f23a2d29f098b661fb1d8251554be31dfcf9c1 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # these parameters are used for infra related variables
 - parameter:
-    name: infra-parameter
+    name: infra-parameters
     parameters:
       - string:
           name: JJB_GIT_REPO
 
 # these parameters are used for setting the Gerrit Project on Nordix
 - parameter:
-    name: project-parameter
+    name: project-parameters
     parameters:
       - string:
           name: PROJECT
           default: '{project}'
           description: JJB configured PROJECT parameter to identify a Nordix Gerrit project
+      - string:
+          name: BRANCH
+          default: '{branch}'
+          description: "JJB configured BRANCH parameter (e.g. master, nordix-dev)"
 
 # these parameters are used for streaming changes from various Gerrit Systems
 - parameter:
@@ -69,7 +73,7 @@
     name: git-scm
     scm:
       - git: &git-scm-defaults
-          url: '$GIT_BASE_HTTPS'
+          url: '$GIT_BASE_HTTPS/$PROJECT'
           branches:
             - 'origin/$BRANCH'
           timeout: 15
               file-paths:
                 - compare-type: 'ANT'
                   pattern: '{files}'
+
+# wrappers to use for jobs
+- wrapper:
+    name: nordixinfra-jjb-creds-wrapper
+    wrappers:
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: nordixinfra-jjb-creds
+              username: JJB_USERNAME
+              password: JJB_USERTOKEN