Tests: Add tests for job and template using elements from defaults

Change-Id: I15ecc4a4b8328ff2cf5580e439e51b022a8f6089
This commit is contained in:
Vsevolod Fedorov 2023-02-14 11:35:56 +03:00
parent fa1ac99ff0
commit 2a8df2ced9
4 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?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>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>

View File

@ -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

View File

@ -0,0 +1,21 @@
<?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>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>

View File

@ -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