Tests: Add test for defaults defined at project

Change-Id: I0cafdd1b97625ef8a49d04f59c92d12694eb90d2
This commit is contained in:
Vsevolod Fedorov 2023-02-16 11:52:34 +03:00
parent b3d9ad1cd2
commit de86b2c130
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<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 var=var-value
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

View 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