From: Fatih Degirmenci Date: Thu, 18 Oct 2018 10:16:14 +0000 (+0200) Subject: Add JJB parameters to be used by all jobs X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=03be82a1bf2676324820b6fb5bf740808f69819e;p=infra%2Fcicd.git Add JJB parameters to be used by all jobs Change-Id: I825229d6e99db9191d979d8f8337f8466eb63dea Signed-off-by: Fatih Degirmenci --- diff --git a/jjb/globals/jjb-macros.yaml b/jjb/globals/jjb-macros.yaml new file mode 100644 index 000000000..5e659ea7b --- /dev/null +++ b/jjb/globals/jjb-macros.yaml @@ -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