Merge "Tests: Add test for nested dimention parameter usage"

This commit is contained in:
Zuul 2023-02-04 18:12:18 +00:00 committed by Gerrit Code Review
commit 6b5a38fe0f
4 changed files with 130 additions and 0 deletions

View File

@ -0,0 +1,38 @@
<?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 [param_1_value_1] []</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>
<?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 [param_1_group_default] [param_2_value_2]</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

View File

@ -0,0 +1,24 @@
# Parameter defined at template level (param_3) should see parameters defined under project axes level.
- builder:
name: sample_builder
builders:
- shell: 'echo {param_3}'
- job-template:
name: job-{axis_1}
param_3: !j2: '[{{ param_1 | default("") }}] [{{ param_2 | default("") }}]'
builders:
- sample_builder:
param_3: '{param_3}'
- project:
name: sample-project
param_1: param_1_group_default
axis_1:
- key_1:
param_1: param_1_value_1
- key_2:
param_2: param_2_value_2
jobs:
- job-{axis_1}

View File

@ -0,0 +1,38 @@
<?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 [param_1_value_1] []</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>
<?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 [param_1_group_default] [param_2_value_2]</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

View File

@ -0,0 +1,30 @@
# Parameter defined at template level (param_3) should see parameters defined under job group axes level.
- builder:
name: sample_builder
builders:
- shell: 'echo {param_3}'
- job-template:
name: job-{axis_1}
param_3: !j2: '[{{ param_1 | default("") }}] [{{ param_2 | default("") }}]'
builders:
- sample_builder:
param_3: '{param_3}'
- job-group:
name: sample_group
param_1: param_1_group_default
axis_1:
- key_1:
param_1: param_1_value_1
- key_2:
param_2: param_2_value_2
jobs:
- job-{axis_1}
- project:
name: sample-project
jobs:
- sample_group