Add JJB parameters to be used by all jobs 12/112/3
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 18 Oct 2018 10:16:14 +0000 (12:16 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Thu, 18 Oct 2018 13:01:39 +0000 (15:01 +0200)
Change-Id: I825229d6e99db9191d979d8f8337f8466eb63dea
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
jjb/globals/jjb-macros.yaml [new file with mode: 0644]

diff --git a/jjb/globals/jjb-macros.yaml b/jjb/globals/jjb-macros.yaml
new file mode 100644 (file)
index 0000000..5e659ea
--- /dev/null
@@ -0,0 +1,90 @@
+---
+# these parameters are used for infra related variables
+- parameter:
+    name: infra-parameter
+    parameters:
+      - string:
+          name: JJB_GIT_REPO
+          default: https://git.openstack.org/openstack-infra/jenkins-job-builder
+          description: OpenStack JJB repo
+      - string:
+          name: JJB_VERSION
+          default: 2.2.1
+          description: OpenStack JJB version to install - matches to LFN JJB version
+
+# these parameters are used for setting the Gerrit Project on Nordix
+- parameter:
+    name: project-parameter
+    parameters:
+      - string:
+          name: PROJECT
+          default: '{project}'
+          description: JJB configured PROJECT parameter to identify a Nordix Gerrit project
+
+# these parameters are used for streaming changes from various Gerrit Systems
+- parameter:
+    name: nordix-gerrit-parameters
+    parameters:
+      - string:
+          name: GERRIT_USER
+          default: infra
+          description: Non-interactive user to stream Gerrit Events on Nordix Gerrit
+      - string:
+          name: GIT_BASE_HTTPS
+          default: https://gerrit.nordix.org/
+          description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo
+      - string:
+          name: GIT_BASE_SSH
+          default: ssh://$GERRIT_USER@gerrit.nordix.org:29418/
+          description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo
+
+- parameter:
+    name: onap-gerrit-parameters
+    parameters:
+      - string:
+          name: GERRIT_USER
+          default: nordix
+          description: Non-interactive user to stream Gerrit Events on ONAP Gerrit
+      - string:
+          name: GIT_BASE_HTTPS
+          default: https://gerrit.onap.org/r/p/
+          description: HTTPS URL to Project Repo on ONAP Gerrit to clone repo
+      - string:
+          name: GIT_BASE_SSH
+          default: ssh://$GERRIT_USER@gerrit.onap.org:29418/
+          description: SSH URL to Project Repo on ONAP Gerrit to clone repo
+
+# defaults for job build history
+- property:
+    name: logrotate-default
+    properties:
+      - build-discarder:
+          days-to-keep: 60
+          num-to-keep: 200
+          artifact-days-to-keep: 60
+          artifact-num-to-keep: 200
+
+# defaults for SCM and Gerrit
+- scm:
+    name: git-scm
+    scm:
+      - git: &git-scm-defaults
+          url: '$GIT_BASE_HTTPS'
+          branches:
+            - 'origin/$BRANCH'
+          timeout: 15
+          per-build-tag: false
+          skip-tag: true
+          shallow-clone: false
+          use-author: false
+          ignore-notify: false
+          wipe-workspace: true
+          prune: false
+
+- scm:
+    name: git-scm-gerrit
+    scm:
+      - git:
+          choosing-strategy: 'gerrit'
+          refspec: '$GERRIT_REFSPEC'
+          <<: *git-scm-defaults