diff options
author | Thanh Ha <thanh.ha@linuxfoundation.org> | 2015-01-17 22:10:46 -0500 |
---|---|---|
committer | Thanh Ha <thanh.ha@linuxfoundation.org> | 2015-02-03 21:52:20 -0500 |
commit | 7d44c58aa25cc3169d8f4cc86f7aa9930fb9971d (patch) | |
tree | bf618789123f74ee06828b3f488465c79d531259 /tests | |
parent | d7c37c89a810174afb05499a6a0142384cd1bf21 (diff) | |
download | python-jenkins-job-builder-7d44c58aa25cc3169d8f4cc86f7aa9930fb9971d.tar.gz python-jenkins-job-builder-7d44c58aa25cc3169d8f4cc86f7aa9930fb9971d.tar.xz python-jenkins-job-builder-7d44c58aa25cc3169d8f4cc86f7aa9930fb9971d.zip |
Update SCM Git Clean configuration to use new extensions style
Use the extensions style configuration for setting the SCM Git clean
configuration. With this format we deprecate the older (clean: bool)
configuration format and replace it with this format:
clean:
after: bool
before: bool
The older configuration is still supported so users who did not update
their YAML files can upgrade without updating all their YAML files first.
Change-Id: I1cfc0e2951c2b4de5e67bcb8abdf0b8c070e7fc6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Diffstat (limited to 'tests')
26 files changed, 55 insertions, 27 deletions
diff --git a/tests/duplicates/fixtures/allow_duplicates001.xml b/tests/duplicates/fixtures/allow_duplicates001.xml index f2f66687..feaf936c 100644 --- a/tests/duplicates/fixtures/allow_duplicates001.xml +++ b/tests/duplicates/fixtures/allow_duplicates001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/duplicates/fixtures/allow_macros001.xml b/tests/duplicates/fixtures/allow_macros001.xml index 9fa9983d..11af850e 100644 --- a/tests/duplicates/fixtures/allow_macros001.xml +++ b/tests/duplicates/fixtures/allow_macros001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/duplicates/fixtures/allow_projects001.xml b/tests/duplicates/fixtures/allow_projects001.xml index d515d235..90dce6c6 100644 --- a/tests/duplicates/fixtures/allow_projects001.xml +++ b/tests/duplicates/fixtures/allow_projects001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/duplicates/fixtures/allow_templates001.xml b/tests/duplicates/fixtures/allow_templates001.xml index d515d235..90dce6c6 100644 --- a/tests/duplicates/fixtures/allow_templates001.xml +++ b/tests/duplicates/fixtures/allow_templates001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/duplicates/fixtures/duplicates001.xml b/tests/duplicates/fixtures/duplicates001.xml index cae598f7..1107ce97 100644 --- a/tests/duplicates/fixtures/duplicates001.xml +++ b/tests/duplicates/fixtures/duplicates001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -80,7 +79,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/duplicates/fixtures/duplicates002.xml b/tests/duplicates/fixtures/duplicates002.xml index 01faa930..f2663650 100644 --- a/tests/duplicates/fixtures/duplicates002.xml +++ b/tests/duplicates/fixtures/duplicates002.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -80,7 +79,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/macros/scm/multi-scms001.xml b/tests/macros/scm/multi-scms001.xml index 84ef8e80..6ab7c8a6 100644 --- a/tests/macros/scm/multi-scms001.xml +++ b/tests/macros/scm/multi-scms001.xml @@ -30,7 +30,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -68,7 +67,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/macros/scm/multi-scms002.xml b/tests/macros/scm/multi-scms002.xml index af2b3e79..149afc33 100644 --- a/tests/macros/scm/multi-scms002.xml +++ b/tests/macros/scm/multi-scms002.xml @@ -42,7 +42,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/macros/scm/scm002.xml b/tests/macros/scm/scm002.xml index be1932d3..d38872e1 100644 --- a/tests/macros/scm/scm002.xml +++ b/tests/macros/scm/scm002.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/git-clean01.xml b/tests/scm/fixtures/git-clean01.xml new file mode 100644 index 00000000..d22263d1 --- /dev/null +++ b/tests/scm/fixtures/git-clean01.xml @@ -0,0 +1,42 @@ +<?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://github.com/openstack-infra/jenkins-job-builder.git</url> + </hudson.plugins.git.UserRemoteConfig> + </userRemoteConfigs> + <branches> + <hudson.plugins.git.BranchSpec> + <name>**</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> + <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> + <ignoreNotifyCommit>false</ignoreNotifyCommit> + <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> + <hudson.plugins.git.extensions.impl.CleanBeforeCheckout/> + <hudson.plugins.git.extensions.impl.WipeWorkspace/> + </extensions> + </scm> +</project> diff --git a/tests/scm/fixtures/git-clean01.yaml b/tests/scm/fixtures/git-clean01.yaml new file mode 100644 index 00000000..8c551fa3 --- /dev/null +++ b/tests/scm/fixtures/git-clean01.yaml @@ -0,0 +1,6 @@ +scm: + - git: + url: https://github.com/openstack-infra/jenkins-job-builder.git + clean: + after: true + before: true diff --git a/tests/scm/fixtures/git-ignore-notify01.xml b/tests/scm/fixtures/git-ignore-notify01.xml index 098c0a45..48ebc27c 100644 --- a/tests/scm/fixtures/git-ignore-notify01.xml +++ b/tests/scm/fixtures/git-ignore-notify01.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -35,6 +34,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>true</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-ignore-notify02.xml b/tests/scm/fixtures/git-ignore-notify02.xml index cf7cb864..6a2944f8 100644 --- a/tests/scm/fixtures/git-ignore-notify02.xml +++ b/tests/scm/fixtures/git-ignore-notify02.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -35,6 +34,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-ignore-notify03.xml b/tests/scm/fixtures/git-ignore-notify03.xml index cf7cb864..6a2944f8 100644 --- a/tests/scm/fixtures/git-ignore-notify03.xml +++ b/tests/scm/fixtures/git-ignore-notify03.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -35,6 +34,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-multiple-remotes.xml b/tests/scm/fixtures/git-multiple-remotes.xml index 65831c7f..d5ac5d40 100644 --- a/tests/scm/fixtures/git-multiple-remotes.xml +++ b/tests/scm/fixtures/git-multiple-remotes.xml @@ -26,7 +26,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/git-shallow-clone01.xml b/tests/scm/fixtures/git-shallow-clone01.xml index f3c2044e..8b9bf77f 100644 --- a/tests/scm/fixtures/git-shallow-clone01.xml +++ b/tests/scm/fixtures/git-shallow-clone01.xml @@ -21,7 +21,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -36,6 +35,7 @@ <useShallowClone>true</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-shallow-clone02.xml b/tests/scm/fixtures/git-shallow-clone02.xml index cf7cb864..6a2944f8 100644 --- a/tests/scm/fixtures/git-shallow-clone02.xml +++ b/tests/scm/fixtures/git-shallow-clone02.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -35,6 +34,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-shallow-clone03.xml b/tests/scm/fixtures/git-shallow-clone03.xml index cf7cb864..6a2944f8 100644 --- a/tests/scm/fixtures/git-shallow-clone03.xml +++ b/tests/scm/fixtures/git-shallow-clone03.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> @@ -35,6 +34,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> </scm> diff --git a/tests/scm/fixtures/git-submodule01.xml b/tests/scm/fixtures/git-submodule01.xml index aa481fb6..08d74338 100644 --- a/tests/scm/fixtures/git-submodule01.xml +++ b/tests/scm/fixtures/git-submodule01.xml @@ -18,7 +18,6 @@ <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/git001.xml b/tests/scm/fixtures/git001.xml index 3ef61fbc..3517bf59 100644 --- a/tests/scm/fixtures/git001.xml +++ b/tests/scm/fixtures/git001.xml @@ -23,7 +23,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/git002.xml b/tests/scm/fixtures/git002.xml index 5e1a6283..ab1e895b 100644 --- a/tests/scm/fixtures/git002.xml +++ b/tests/scm/fixtures/git002.xml @@ -23,7 +23,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/gitlab.xml b/tests/scm/fixtures/gitlab.xml index 9d871cf5..887ef98c 100644 --- a/tests/scm/fixtures/gitlab.xml +++ b/tests/scm/fixtures/gitlab.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/local-branch001.xml b/tests/scm/fixtures/local-branch001.xml index 838bf46d..859a26ca 100644 --- a/tests/scm/fixtures/local-branch001.xml +++ b/tests/scm/fixtures/local-branch001.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/scm/fixtures/stash.xml b/tests/scm/fixtures/stash.xml index a50f954a..ea167e5a 100644 --- a/tests/scm/fixtures/stash.xml +++ b/tests/scm/fixtures/stash.xml @@ -20,7 +20,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> diff --git a/tests/yamlparser/fixtures/complete001.xml b/tests/yamlparser/fixtures/complete001.xml index fd10bed8..d556b97b 100644 --- a/tests/yamlparser/fixtures/complete001.xml +++ b/tests/yamlparser/fixtures/complete001.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>true</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>true</pruneBranches> <remotePoll>false</remotePoll> @@ -43,6 +42,7 @@ <useShallowClone>false</useShallowClone> <ignoreNotifyCommit>false</ignoreNotifyCommit> <extensions> + <hudson.plugins.git.extensions.impl.CleanCheckout/> <hudson.plugins.git.extensions.impl.WipeWorkspace/> </extensions> <browser class="hudson.plugins.git.browser.GitWeb"> diff --git a/tests/yamlparser/fixtures/scm_remote_deep_bug.xml b/tests/yamlparser/fixtures/scm_remote_deep_bug.xml index 86a4a4b0..05575c40 100644 --- a/tests/yamlparser/fixtures/scm_remote_deep_bug.xml +++ b/tests/yamlparser/fixtures/scm_remote_deep_bug.xml @@ -28,7 +28,6 @@ <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> - <clean>false</clean> <wipeOutWorkspace>true</wipeOutWorkspace> <pruneBranches>false</pruneBranches> <remotePoll>false</remotePoll> |