SCM
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 a single scm definiton.
- Component: scm
Macro: | scm |
Entry Point: | jenkins_jobs.scm |
Example:
job:
name: test_job
scm:
-git:
url: https://example.com/project.git
-
git
Specifies the git SCM repository for this job.
Requires the Jenkins Git Plugin.
Parameters: |
- url (str) – URL of the git repository
- refspec (str) – refspec to fetch
- name (str) – name to fetch
- branches (list(str)) – list of branch specifiers to build
- basedir (str) – location relative to the workspace root to clone to
(default: workspace)
- skip-tag (bool) – Skip tagging
- prune (bool) – Prune remote branches
- clean (bool) – Clean after checkout
- fastpoll (bool) – Use fast remote polling
- disable-submodules (bool) – Disable submodules
- recursive-submodules (bool) – Recursively update submodules
- use-author (bool) – Use author rather than committer in Jenkin’s build
changeset
- git-tool (str) – The name of the Git installation to use
- wipe-workspace (bool) – Wipe out workspace before build
- browser (str) – what repository browser to use (default ‘(Auto)’)
- browser-url (str) – url for the repository browser
|
Browser values: |
githubweb: | |
fisheye: | |
bitbucketweb: | |
gitblit: | |
gitlab: | |
gitoriousweb: | |
gitweb: | |
redmineweb: | |
viewgit: | |
|
Example:
scm:
- git:
url: https://example.com/project.git
branches:
- master
- stable
browser: githubweb
browser-url: http://github.com/foo/example.git
-
svn
Specifies the svn SCM repository for this job.
Parameters: |
|
Workspaceupdater values: |
|
wipeworkspace: |
- deletes the workspace before checking out
|
revertupdate: |
- do an svn revert then an svn update
|
emulateclean: |
- delete unversioned/ignored files then update
|
update: |
- do an svn update as much as possible
|
|
Example:
scm:
- svn:
workspaceupdater: update
repos:
- url: http://svn.example.com/repo
basedir: .
- url: http://svn.example.com/repo2
basedir: repo2