From: Jeremy Phelps Date: Tue, 30 May 2017 16:40:41 +0000 (-0500) Subject: Make Github url and clone url at Jenkins level. X-Git-Tag: v0.3.0~7^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=3cde2303717915affb9bc5f8f6df6e075d8168d9;p=releng%2Fglobal-jjb.git Make Github url and clone url at Jenkins level. Provide a way to access Github url and Github clone url. Github url and clone url will be set at global level in Jenkins; GIT_URL and GIT_CLONE_URL respectively. JIRA: RELENG-151 Change-Id: I2fdc509b27d97816aab2168a6a7863d295c3dd8a Signed-off-by: Jeremy Phelps --- diff --git a/README.md b/README.md index 4c21ec69..42367158 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,15 @@ For example: ``` GIT_URL=ssh://jenkins-$SILO@git.opendaylight.org:29418 +GIT_CLONE_URL=git@github.com: JENKINS_HOSTNAME=jenkins092 LOGS_SERVER=https://logs.opendaylight.org NEXUS_URL=https://nexus.opendaylight.org SILO=releng ``` +Note: **GIT_CLONE_URL** is only used by Github projects as this +will be different from the URL used the poperties +configuration. ## Jenkins Plugin Requirements @@ -74,11 +78,9 @@ Trigger global configuration. **jenkins-ssh-credential**: The name of the Jenkins Credential to use for ssh connections. -If you are using GitHub then there are two more parameters which +If you are using GitHub then there is one more parameter which will need to be placed in the defaults.yaml -**github-url**: The URL of GitHub. (Default: https://github.com) - **github-org**: The name of the GitHub organization. defaults.yaml: diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 03db349c..861c4ca6 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -185,23 +185,17 @@ # yamllint disable-line rule:key-duplicates <<: *lf_jjb_merge_builders - ###################### - # Default parameters # - ###################### - - github-url: https://github.com - ##################### # Job Configuration # ##################### properties: - github: - url: '{github-url}/{github-org}/{project}' + url: '${{GIT_URL}}{github-org}/{project}' scm: - lf-infra-github-scm: - url: 'git@github.com:{github-org}/{project}' + url: '${{GIT_CLONE_URL}}{github-org}/{project}' refspec: '' branch: '{branch}' submodule-recursive: '{submodule-recursive}' @@ -229,23 +223,17 @@ # yamllint disable-line rule:key-duplicates <<: *lf_jjb_merge_builders - ###################### - # Default parameters # - ###################### - - github-url: https://github.com - ##################### # Job Configuration # ##################### properties: - github: - url: '{github-url}/{github-org}/{project}' + url: '${{GIT_URL}}{github-org}/{project}' scm: - lf-infra-github-scm: - url: 'git@github.com:{github-org}/{project}' + url: '${{GIT_CLONE_URL}}{github-org}/{project}' refspec: '+refs/pull/*:refs/remotes/origin/pr/*' branch: '{branch}' submodule-recursive: '{submodule-recursive}'