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 <jphelps@linuxfoundation.org>
```
GIT_URL=ssh://jenkins-$SILO@git.opendaylight.org:29418
```
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
```
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
## Jenkins Plugin Requirements
**jenkins-ssh-credential**: The name of the Jenkins Credential to use for ssh
connections.
**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
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:
**github-org**: The name of the GitHub organization.
defaults.yaml:
# yamllint disable-line rule:key-duplicates
<<: *lf_jjb_merge_builders
# yamllint disable-line rule:key-duplicates
<<: *lf_jjb_merge_builders
- ######################
- # Default parameters #
- ######################
-
- github-url: https://github.com
-
#####################
# Job Configuration #
#####################
properties:
- github:
#####################
# Job Configuration #
#####################
properties:
- github:
- url: '{github-url}/{github-org}/{project}'
+ url: '${{GIT_URL}}{github-org}/{project}'
scm:
- lf-infra-github-scm:
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}'
refspec: ''
branch: '{branch}'
submodule-recursive: '{submodule-recursive}'
# yamllint disable-line rule:key-duplicates
<<: *lf_jjb_merge_builders
# yamllint disable-line rule:key-duplicates
<<: *lf_jjb_merge_builders
- ######################
- # Default parameters #
- ######################
-
- github-url: https://github.com
-
#####################
# Job Configuration #
#####################
properties:
- github:
#####################
# Job Configuration #
#####################
properties:
- github:
- url: '{github-url}/{github-org}/{project}'
+ url: '${{GIT_URL}}{github-org}/{project}'
scm:
- lf-infra-github-scm:
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}'
refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
branch: '{branch}'
submodule-recursive: '{submodule-recursive}'