Merge "SCM repo: add ignore-projects option"
This commit is contained in:
commit
276e519395
@ -617,6 +617,8 @@ def repo(parser, xml_parent, data):
|
|||||||
(optional)
|
(optional)
|
||||||
:arg str manifest-group: Only retrieve those projects in the manifest
|
:arg str manifest-group: Only retrieve those projects in the manifest
|
||||||
tagged with the provided group name (optional)
|
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
|
:arg str destination-dir: Location relative to the workspace root to clone
|
||||||
under (optional)
|
under (optional)
|
||||||
:arg str repo-url: custom url to retrieve the repo application (optional)
|
:arg str repo-url: custom url to retrieve the repo application (optional)
|
||||||
@ -689,6 +691,13 @@ def repo(parser, xml_parent, data):
|
|||||||
else:
|
else:
|
||||||
xe.text = str(val)
|
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):
|
def store(parser, xml_parent, data):
|
||||||
"""yaml: store
|
"""yaml: store
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
<noTags>false</noTags>
|
<noTags>false</noTags>
|
||||||
<trace>false</trace>
|
<trace>false</trace>
|
||||||
<showAllChanges>false</showAllChanges>
|
<showAllChanges>false</showAllChanges>
|
||||||
|
<ignoreProjects class="linked-hash-set">
|
||||||
|
<string/>
|
||||||
|
</ignoreProjects>
|
||||||
</hudson.plugins.repo.RepoScm>
|
</hudson.plugins.repo.RepoScm>
|
||||||
<hudson.plugins.git.GitSCM>
|
<hudson.plugins.git.GitSCM>
|
||||||
<configVersion>2</configVersion>
|
<configVersion>2</configVersion>
|
||||||
|
@ -23,5 +23,9 @@
|
|||||||
remote="gerrit" revision="master" />
|
remote="gerrit" revision="master" />
|
||||||
</manifest>
|
</manifest>
|
||||||
</localManifest>
|
</localManifest>
|
||||||
|
<ignoreProjects class="linked-hash-set">
|
||||||
|
<string>static-project</string>
|
||||||
|
<string>unimportant-project</string>
|
||||||
|
</ignoreProjects>
|
||||||
</scm>
|
</scm>
|
||||||
</project>
|
</project>
|
||||||
|
@ -4,6 +4,9 @@ scm:
|
|||||||
manifest-branch: stable
|
manifest-branch: stable
|
||||||
manifest-file: repo.xml
|
manifest-file: repo.xml
|
||||||
manifest-group: drivers
|
manifest-group: drivers
|
||||||
|
ignore-projects:
|
||||||
|
- static-project
|
||||||
|
- unimportant-project
|
||||||
destination-dir: build
|
destination-dir: build
|
||||||
repo-url: https://internal.net/projects/repo
|
repo-url: https://internal.net/projects/repo
|
||||||
mirror-dir: ~/git/project/
|
mirror-dir: ~/git/project/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user