make scm test as the example

scm module had a few existing tests so now those tests are the examples.

Change-Id: Iaf039a5bb6f3910b09198e4a800a94f3f58804f9
This commit is contained in:
Khai Do 2014-01-06 16:50:20 -08:00 committed by Gerrit Code Review
parent bbfdeff09a
commit bf3218193b
8 changed files with 67 additions and 42 deletions

View File

@ -26,17 +26,6 @@ SCMs plugin.
:Macro: scm
:Entry Point: jenkins_jobs.scm
Example::
job:
name: test_job
scm:
-git:
url: https://example.com/project.git
-git:
url: https://example.org/otherproject.git
basedir: other
"""
@ -105,16 +94,9 @@ def git(self, xml_parent, data):
:inverse:
:gerrit:
Example::
Example:
scm:
- git:
url: https://example.com/project.git
branches:
- master
- stable
browser: githubweb
browser-url: http://github.com/foo/example.git
.. literalinclude:: /../../tests/scm/fixtures/git001.yaml
"""
# XXX somebody should write the docs for those with option name =
@ -261,26 +243,9 @@ def repo(self, xml_parent, data):
:arg str local-manifest: Contents of .repo/local_manifest.xml, written
prior to calling sync (optional)
Example::
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>
.. literalinclude:: /../../tests/scm/fixtures/repo001.yaml
"""
scm = XML.SubElement(xml_parent,

View File

@ -1,4 +1,3 @@
# vim: sw=4 ts=4 et
scm:
- git:
url: https://github.com/openstack-infra/jenkins-job-builder.git

View File

@ -1,4 +1,3 @@
# vim: sw=4 ts=4 et
scm:
- git:
url: https://github.com/openstack-infra/jenkins-job-builder.git

View File

@ -1,4 +1,3 @@
# vim: sw=4 ts=4 et
scm:
- git:
url: https://github.com/openstack-infra/jenkins-job-builder.git

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
<url>https://example.com/project.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>master</name>
</hudson.plugins.git.BranchSpec>
<hudson.plugins.git.BranchSpec>
<name>stable</name>
</hudson.plugins.git.BranchSpec>
</branches>
<excludedUsers/>
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>false</recursiveSubmodules>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<authorOrCommitter>false</authorOrCommitter>
<clean>false</clean>
<wipeOutWorkspace>true</wipeOutWorkspace>
<pruneBranches>false</pruneBranches>
<remotePoll>false</remotePoll>
<gitTool>Default</gitTool>
<submoduleCfg class="list"/>
<relativeTargetDir/>
<reference/>
<gitConfigName/>
<gitConfigEmail/>
<skipTag>false</skipTag>
<scmName/>
<useShallowClone>false</useShallowClone>
<browser class="hudson.plugins.git.browser.GithubWeb">
<url>http://github.com/foo/example.git</url>
</browser>
</scm>
</project>

View File

@ -0,0 +1,8 @@
scm:
- git:
url: https://example.com/project.git
branches:
- master
- stable
browser: githubweb
browser-url: http://github.com/foo/example.git

View File

@ -11,5 +11,11 @@
<jobs>3</jobs>
<currentBranch>false</currentBranch>
<quiet>false</quiet>
<localManifest>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;manifest&gt;
&lt;project path=&quot;external/project&quot; name=&quot;org/project&quot;
remote=&quot;gerrit&quot; revision=&quot;master&quot; /&gt;
&lt;/manifest&gt;
</localManifest>
</scm>
</project>

View File

@ -10,3 +10,9 @@ scm:
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>