Tests: Add test for merging defaults for a job

Change-Id: I04cd8f080fea7b4cb87182db20ea4d164d6fa267
This commit is contained in:
Vsevolod Fedorov 2023-02-14 13:33:19 +03:00
parent 2a8df2ced9
commit 1f43cfb8a8
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<description>Custom description&lt;!-- Managed by Jenkins Job Builder --&gt;</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 hi</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

View File

@ -0,0 +1,18 @@
# Global defaults are not used, not merged to custom ones if used from a job.
- defaults:
name: global
description: 'Global description'
concurrent: true
wrappers:
- timestamps
- defaults:
name: custom-defaults
description: 'Custom description'
- job:
name: sample-job
defaults: custom-defaults
builders:
- shell: echo hi