Tests: Add tests for job and template using elements from defaults
Change-Id: I15ecc4a4b8328ff2cf5580e439e51b022a8f6089
This commit is contained in:
parent
fa1ac99ff0
commit
2a8df2ced9
21
tests/yamlparser/job_fixtures/job_honor_default_elements.xml
Normal file
21
tests/yamlparser/job_fixtures/job_honor_default_elements.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>true</concurrentBuild>
|
||||
<canRoam>true</canRoam>
|
||||
<properties/>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<builders>
|
||||
<hudson.tasks.Shell>
|
||||
<command>echo hi</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers>
|
||||
<hudson.plugins.timestamper.TimestamperBuildWrapper/>
|
||||
</buildWrappers>
|
||||
</project>
|
@ -0,0 +1,12 @@
|
||||
# Job should take elements defined by defaults.
|
||||
|
||||
- defaults:
|
||||
name: global
|
||||
concurrent: true
|
||||
wrappers:
|
||||
- timestamps
|
||||
|
||||
- job:
|
||||
name: sample-job
|
||||
builders:
|
||||
- shell: echo hi
|
@ -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>true</concurrentBuild>
|
||||
<canRoam>true</canRoam>
|
||||
<properties/>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<builders>
|
||||
<hudson.tasks.Shell>
|
||||
<command>echo hi</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers>
|
||||
<hudson.plugins.timestamper.TimestamperBuildWrapper/>
|
||||
</buildWrappers>
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
# Template should take from defaults no just parameters, but other elements also.
|
||||
|
||||
- defaults:
|
||||
name: global
|
||||
concurrent: true
|
||||
wrappers:
|
||||
- timestamps
|
||||
|
||||
- job-template:
|
||||
name: sample-job
|
||||
builders:
|
||||
- shell: echo hi
|
||||
|
||||
- project:
|
||||
name: sample-project
|
||||
jobs:
|
||||
- sample-job
|
Loading…
Reference in New Issue
Block a user