Merge "SCM repo: add ignore-projects option"
This commit is contained in:
commit
276e519395
jenkins_jobs/modules
tests
@ -617,6 +617,8 @@ def repo(parser, xml_parent, data):
|
||||
(optional)
|
||||
:arg str manifest-group: Only retrieve those projects in the manifest
|
||||
tagged with the provided group name (optional)
|
||||
:arg list(str) ignore-projects: a list of projects in which changes would
|
||||
not be considered to trigger a build when pooling (optional)
|
||||
:arg str destination-dir: Location relative to the workspace root to clone
|
||||
under (optional)
|
||||
:arg str repo-url: custom url to retrieve the repo application (optional)
|
||||
@ -689,6 +691,13 @@ def repo(parser, xml_parent, data):
|
||||
else:
|
||||
xe.text = str(val)
|
||||
|
||||
# ignore-projects does not follow the same pattern of the other parameters,
|
||||
# so process it here:
|
||||
ip = XML.SubElement(scm, 'ignoreProjects', {'class': 'linked-hash-set'})
|
||||
ignored_projects = data.get('ignore-projects', [''])
|
||||
for ignored_project in ignored_projects:
|
||||
XML.SubElement(ip, 'string').text = str(ignored_project)
|
||||
|
||||
|
||||
def store(parser, xml_parent, data):
|
||||
"""yaml: store
|
||||
|
@ -27,6 +27,9 @@
|
||||
<noTags>false</noTags>
|
||||
<trace>false</trace>
|
||||
<showAllChanges>false</showAllChanges>
|
||||
<ignoreProjects class="linked-hash-set">
|
||||
<string/>
|
||||
</ignoreProjects>
|
||||
</hudson.plugins.repo.RepoScm>
|
||||
<hudson.plugins.git.GitSCM>
|
||||
<configVersion>2</configVersion>
|
||||
|
@ -23,5 +23,9 @@
|
||||
remote="gerrit" revision="master" />
|
||||
</manifest>
|
||||
</localManifest>
|
||||
<ignoreProjects class="linked-hash-set">
|
||||
<string>static-project</string>
|
||||
<string>unimportant-project</string>
|
||||
</ignoreProjects>
|
||||
</scm>
|
||||
</project>
|
||||
|
@ -4,6 +4,9 @@ scm:
|
||||
manifest-branch: stable
|
||||
manifest-file: repo.xml
|
||||
manifest-group: drivers
|
||||
ignore-projects:
|
||||
- static-project
|
||||
- unimportant-project
|
||||
destination-dir: build
|
||||
repo-url: https://internal.net/projects/repo
|
||||
mirror-dir: ~/git/project/
|
||||
|
Loading…
x
Reference in New Issue
Block a user