The SCM module allows you to specify the source code location for the project. It adds the scm attribute to the Job definition, which accepts any number of scm definitions.
Macro: | scm |
---|---|
Entry Point: | jenkins_jobs.scm |
The scm module allows referencing multiple repositories in a Jenkins job. Note: Adding more than one scm definition requires the Jenkins Multiple SCMs plugin.
- scm:
name: first-scm
scm:
- git:
url: ssh://jenkins@review.openstack.org:29418/first.git
branches:
- origin/master
- scm:
name: second-scm
scm:
- git:
url: ssh://jenkins@review.openstack.org:29418/second.git
branches:
- origin/master
- scm:
name: first-and-second
scm:
- first-scm
- second-scm
- job:
name: my-job
scm:
- first-and-second
Specifies the git SCM repository for this job. Requires the Jenkins Git Plugin.
Parameters: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Browser values: |
|
||||||||||||||||||||||||
Choosing-strategy values: | |||||||||||||||||||||||||
|
Example:
scm:
- git:
url: https://example.com/project.git
branches:
- master
- stable
browser: githubweb
browser-url: http://github.com/foo/example.git
Specifies the repo SCM repository for this job. Requires the Jenkins Repo Plugin.
Parameters: |
|
---|
Example:
scm:
- repo:
manifest-url: https://example.com/project/
manifest-branch: stable
manifest-file: repo.xml
manifest-group: drivers
destination-dir: build
repo-url: https://internal.net/projects/repo
mirror-dir: ~/git/project/
jobs: 3
current-branch: false
quiet: false
local-manifest: |
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="external/project" name="org/project"
remote="gerrit" revision="master" />
</manifest>
Specifies the svn SCM repository for this job.
Parameters: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Workspaceupdater values: | |||||||||
|
Example:
scm:
- svn:
workspaceupdater: update
repos:
- url: http://svn.example.com/repo
basedir: .
- url: http://svn.example.com/repo2
basedir: repo2
Specifies the Team Foundation Server repository for this job. Requires the Jenkins Team Foundation Server Plugin.
NOTE: TFS Password must be entered manually on the project if a user name is specified. The password will be overwritten with an empty value every time the job is rebuilt with Jenkins Job Builder.
Parameters: |
|
---|
Examples:
scm:
- tfs:
server-url: "tfs.company.com"
project-path: "$/myproject"
login: "mydomain\\jane"
use-update: false
local-path: "../foo/"
workspace: "Hudson-${JOB_NAME}"
web-access:
- web-url: "http://TFSMachine:8080"
scm:
- tfs:
server-url: "tfs.company.com"
project-path: "$/myproject"
login: "jane@mydomain"
use-update: false
local-path: "../foo/"
workspace: "Hudson-${JOB_NAME}"
web-access:
scm:
- tfs:
server-url: "tfs.company.com"
project-path: "$/myproject"
login: "mydomain\\jane"
use-update: false
local-path: "../foo/"
workspace: "Hudson-${JOB_NAME}"
Specifies the cloned workspace for this job to use as a SCM source. Requires the Jenkins Clone Workspace SCM Plugin.
The job the workspace is cloned from must be configured with an clone-workspace publisher
Parameters: |
|
---|
Example:
scm:
- workspace:
parent-job: my-upstream-job
criteria: Any