diff options
author | Zuul <zuul@review.openstack.org> | 2018-11-19 01:55:15 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-11-19 01:55:15 +0000 |
commit | d29998eaa9c308bdc74e72e2d4dc9e3d70d80904 (patch) | |
tree | 758cda97854c7f570f86b7a317558676569c94c1 /tests | |
parent | 6b6e8fb4e13fa5adbe6699a44680d865d9513a99 (diff) | |
parent | 3806c9c3d74540869d7349b32aa6ad060584b79d (diff) | |
download | python-jenkins-job-builder-d29998eaa9c308bdc74e72e2d4dc9e3d70d80904.tar.gz python-jenkins-job-builder-d29998eaa9c308bdc74e72e2d4dc9e3d70d80904.tar.xz python-jenkins-job-builder-d29998eaa9c308bdc74e72e2d4dc9e3d70d80904.zip |
Merge "Handle cancel-builds-on-update values from vars"
Diffstat (limited to 'tests')
4 files changed, 97 insertions, 0 deletions
diff --git a/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.xml b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.xml new file mode 100644 index 00000000..0832d960 --- /dev/null +++ b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<project> + <actions/> + <description><!-- Managed by Jenkins Job Builder --></description> + <keepDependencies>false</keepDependencies> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <concurrentBuild>false</concurrentBuild> + <canRoam>true</canRoam> + <properties/> + <scm class="hudson.scm.NullSCM"/> + <triggers class="vector"> + <org.jenkinsci.plugins.ghprb.GhprbTrigger> + <adminlist/> + <whitelist/> + <orgslist/> + <whiteListLabels/> + <blackListLabels/> + <excludedRegions/> + <includedRegions/> + <spec/> + <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin> + <cron/> + <triggerPhrase/> + <skipBuildPhrase/> + <onlyTriggerPhrase>false</onlyTriggerPhrase> + <useGitHubHooks>false</useGitHubHooks> + <permitAll>false</permitAll> + <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests> + <extensions> + <org.jenkinsci.plugins.ghprb.extensions.build.GhprbCancelBuildsOnUpdate/> + </extensions> + </org.jenkinsci.plugins.ghprb.GhprbTrigger> + </triggers> + <builders/> + <publishers/> + <buildWrappers/> +</project> diff --git a/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.yaml b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.yaml new file mode 100644 index 00000000..a3245c2c --- /dev/null +++ b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable001.yaml @@ -0,0 +1,12 @@ +--- +- job-template: + name: 'github-pull-request-variable-test-true' + triggers: + - github-pull-request: + cancel-builds-on-update: '{test-var}' + +- project: + name: test-true + test-var: true + jobs: + - 'github-pull-request-variable-test-true' diff --git a/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.xml b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.xml new file mode 100644 index 00000000..1d913309 --- /dev/null +++ b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<project> + <actions/> + <description><!-- Managed by Jenkins Job Builder --></description> + <keepDependencies>false</keepDependencies> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <concurrentBuild>false</concurrentBuild> + <canRoam>true</canRoam> + <properties/> + <scm class="hudson.scm.NullSCM"/> + <triggers class="vector"> + <org.jenkinsci.plugins.ghprb.GhprbTrigger> + <adminlist/> + <whitelist/> + <orgslist/> + <whiteListLabels/> + <blackListLabels/> + <excludedRegions/> + <includedRegions/> + <spec/> + <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin> + <cron/> + <triggerPhrase/> + <skipBuildPhrase/> + <onlyTriggerPhrase>false</onlyTriggerPhrase> + <useGitHubHooks>false</useGitHubHooks> + <permitAll>false</permitAll> + <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests> + </org.jenkinsci.plugins.ghprb.GhprbTrigger> + </triggers> + <builders/> + <publishers/> + <buildWrappers/> +</project> diff --git a/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.yaml b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.yaml new file mode 100644 index 00000000..39c35c42 --- /dev/null +++ b/tests/yamlparser/fixtures/github_cancel_builds_on_update_variable002.yaml @@ -0,0 +1,12 @@ +--- +- job-template: + name: 'github-pull-request-variable-test-false' + triggers: + - github-pull-request: + cancel-builds-on-update: '{test-var}' + +- project: + name: test-false + test-var: false + jobs: + - 'github-pull-request-variable-test-false' |