Tests: Add tests for using tags in parameter definition
Change-Id: Ib9a6c567c50f37643a498c879b82d05d1c7a856e
This commit is contained in:
parent
7c5300459d
commit
e77555e242
@ -0,0 +1 @@
|
|||||||
|
some description
|
16
tests/yamlparser/job_fixtures/regression-2007227.xml
Normal file
16
tests/yamlparser/job_fixtures/regression-2007227.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<actions/>
|
||||||
|
<description>some 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"/>
|
||||||
|
<builders/>
|
||||||
|
<publishers/>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
18
tests/yamlparser/job_fixtures/regression-2007227.yaml
Normal file
18
tests/yamlparser/job_fixtures/regression-2007227.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# https://storyboard.openstack.org/#!/story/2007227
|
||||||
|
# with Python 3 there is TypeError when include-raw with property replacement is used in defaults
|
||||||
|
|
||||||
|
- defaults:
|
||||||
|
name: 'test-defaults'
|
||||||
|
prop: 'regression-2007227.description'
|
||||||
|
description: !include-raw:
|
||||||
|
- '{prop}.html'
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: 'test-project'
|
||||||
|
jobs:
|
||||||
|
- 'test-job'
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
id: 'test-job'
|
||||||
|
name: '{id}'
|
||||||
|
defaults: 'test-defaults'
|
@ -0,0 +1 @@
|
|||||||
|
variable contents
|
@ -0,0 +1,21 @@
|
|||||||
|
<?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"/>
|
||||||
|
<builders>
|
||||||
|
<hudson.tasks.Shell>
|
||||||
|
<command>echo variable contents
|
||||||
|
|
||||||
|
</command>
|
||||||
|
</hudson.tasks.Shell>
|
||||||
|
</builders>
|
||||||
|
<publishers/>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
@ -0,0 +1,13 @@
|
|||||||
|
# !include-raw-escape: tag in a variable.
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
name: sample-job
|
||||||
|
var: !include-raw-escape: tag_in_parameter-include-raw-escape.inc.txt
|
||||||
|
builders:
|
||||||
|
- shell: |
|
||||||
|
echo {var}
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: sample-project
|
||||||
|
jobs:
|
||||||
|
- sample-job
|
@ -0,0 +1 @@
|
|||||||
|
variable contents
|
@ -0,0 +1,21 @@
|
|||||||
|
<?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"/>
|
||||||
|
<builders>
|
||||||
|
<hudson.tasks.Shell>
|
||||||
|
<command>echo variable contents
|
||||||
|
|
||||||
|
</command>
|
||||||
|
</hudson.tasks.Shell>
|
||||||
|
</builders>
|
||||||
|
<publishers/>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
@ -0,0 +1,13 @@
|
|||||||
|
# !include-raw: tag in a variable.
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
name: sample-job
|
||||||
|
var: !include-raw: tag_in_parameter-include-raw.inc.txt
|
||||||
|
builders:
|
||||||
|
- shell: |
|
||||||
|
echo {var}
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: sample-project
|
||||||
|
jobs:
|
||||||
|
- sample-job
|
@ -0,0 +1 @@
|
|||||||
|
variable contents
|
21
tests/yamlparser/job_fixtures/tag_in_parameter-include.xml
Normal file
21
tests/yamlparser/job_fixtures/tag_in_parameter-include.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?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"/>
|
||||||
|
<builders>
|
||||||
|
<hudson.tasks.Shell>
|
||||||
|
<command>echo variable contents
|
||||||
|
|
||||||
|
</command>
|
||||||
|
</hudson.tasks.Shell>
|
||||||
|
</builders>
|
||||||
|
<publishers/>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
13
tests/yamlparser/job_fixtures/tag_in_parameter-include.yaml
Normal file
13
tests/yamlparser/job_fixtures/tag_in_parameter-include.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# !include: tag in a variable.
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
name: sample-job
|
||||||
|
var: !include: tag_in_parameter-include.inc
|
||||||
|
builders:
|
||||||
|
- shell: |
|
||||||
|
echo {var}
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: sample-project
|
||||||
|
jobs:
|
||||||
|
- sample-job
|
21
tests/yamlparser/job_fixtures/tag_in_parameter-join.xml
Normal file
21
tests/yamlparser/job_fixtures/tag_in_parameter-join.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?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"/>
|
||||||
|
<builders>
|
||||||
|
<hudson.tasks.Shell>
|
||||||
|
<command>echo some variable
|
||||||
|
|
||||||
|
</command>
|
||||||
|
</hudson.tasks.Shell>
|
||||||
|
</builders>
|
||||||
|
<publishers/>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
15
tests/yamlparser/job_fixtures/tag_in_parameter-join.yaml
Normal file
15
tests/yamlparser/job_fixtures/tag_in_parameter-join.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# !join: tag in a variable.
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
name: sample-job
|
||||||
|
var: !join:
|
||||||
|
- ' '
|
||||||
|
- [some, variable]
|
||||||
|
builders:
|
||||||
|
- shell: |
|
||||||
|
echo {var}
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: sample-project
|
||||||
|
jobs:
|
||||||
|
- sample-job
|
Loading…
x
Reference in New Issue
Block a user