Merge "Tests: Add test for overriding dimention name parameter"

This commit is contained in:
Zuul 2023-02-04 18:10:30 +00:00 committed by Gerrit Code Review
commit 8fd9ed5aa3
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?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_key param_2_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_value_2 param_2_value_2
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

View File

@ -0,0 +1,21 @@
# If a parameter with the same name as dimension name specified, it's value
# should be used as dimension parameter value.
# For examle, 'param_1' is overriden for 'param_2_key' with 'param_1_value_2' value.
- job-template:
name: job-{param_1}
builders:
- shell: |
echo {param_1} {param_2}
- project:
name: sample-project
param_1:
- param_1_key:
param_2: param_2_value_1
- param_2_key:
param_1: param_1_value_2
param_2: param_2_value_2
jobs:
- job-{param_1}