Tests: Add test for defaults defined at project
Change-Id: I0cafdd1b97625ef8a49d04f59c92d12694eb90d2
This commit is contained in:
parent
b3d9ad1cd2
commit
de86b2c130
20
tests/yamlparser/job_fixtures/project_defaults.xml
Normal file
20
tests/yamlparser/job_fixtures/project_defaults.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?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 var=var-value
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers/>
|
||||
</project>
|
17
tests/yamlparser/job_fixtures/project_defaults.yaml
Normal file
17
tests/yamlparser/job_fixtures/project_defaults.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
# Defaults defined at project should be honored.
|
||||
|
||||
- defaults:
|
||||
name: custom-defaults
|
||||
var: var-value
|
||||
|
||||
- job-template:
|
||||
name: sample-job
|
||||
builders:
|
||||
- shell: |
|
||||
echo var={var}
|
||||
|
||||
- project:
|
||||
name: sample-project
|
||||
defaults: custom-defaults
|
||||
jobs:
|
||||
- sample-job
|
Loading…
Reference in New Issue
Block a user