Add alias to multijob builder
It's helpful to have possibility to set `jobAlias` in case the same job is used multiple times with different configurations. Change-Id: Ic092c6b2f5d893e75ebce4aaebc7eaf88a8978a6
This commit is contained in:
parent
8c29f8931c
commit
fa688582a6
@ -1958,6 +1958,9 @@ def multijob(registry, xml_parent, data):
|
||||
|
||||
:Project:
|
||||
* **name** (`str`) -- Project name
|
||||
* **alias** (`str`) -- Project alias, which will be shown
|
||||
in MultiJob Overview. Helpful when working with the same
|
||||
project multiple times with different configurations
|
||||
* **current-parameters** (`bool`) -- Pass current build
|
||||
parameters to the other job (default false)
|
||||
* **node-label-name** (`str`) -- Define a list of nodes
|
||||
@ -2025,6 +2028,12 @@ def multijob(registry, xml_parent, data):
|
||||
]
|
||||
helpers.convert_mapping_to_xml(phaseJob, project, mapping, fail_required=True)
|
||||
# Pass through other params
|
||||
if project.get("alias"):
|
||||
mapping = [("alias", "jobAlias", None)]
|
||||
helpers.convert_mapping_to_xml(
|
||||
phaseJob, project, mapping, fail_required=True
|
||||
)
|
||||
|
||||
configs = XML.SubElement(phaseJob, "configs")
|
||||
|
||||
nodeLabelName = project.get("node-label-name")
|
||||
|
@ -105,5 +105,30 @@
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
</phaseJobs>
|
||||
</com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
<com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
<phaseName>PhaseFive</phaseName>
|
||||
<continuationCondition>SUCCESSFUL</continuationCondition>
|
||||
<executionType>PARALLEL</executionType>
|
||||
<phaseJobs>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseFiveJobA</jobName>
|
||||
<currParams>false</currParams>
|
||||
<jobAlias>PhaseFiveJobRunA</jobAlias>
|
||||
<configs/>
|
||||
<abortAllJob>false</abortAllJob>
|
||||
<aggregatedTestResults>false</aggregatedTestResults>
|
||||
<enableRetryStrategy>false</enableRetryStrategy>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
<jobName>PhaseFiveJobA</jobName>
|
||||
<currParams>false</currParams>
|
||||
<jobAlias>PhaseFiveJobRunB</jobAlias>
|
||||
<configs/>
|
||||
<abortAllJob>false</abortAllJob>
|
||||
<aggregatedTestResults>false</aggregatedTestResults>
|
||||
<enableRetryStrategy>false</enableRetryStrategy>
|
||||
</com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
|
||||
</phaseJobs>
|
||||
</com.tikal.jenkins.plugins.multijob.MultiJobBuilder>
|
||||
</builders>
|
||||
</project>
|
||||
|
@ -43,3 +43,10 @@ builders:
|
||||
retry:
|
||||
max-retry: 3
|
||||
strategy-path: "/PhaseFour/PhaseFourRetry.prop"
|
||||
- multijob:
|
||||
name: PhaseFive
|
||||
projects:
|
||||
- name: PhaseFiveJobA
|
||||
alias: PhaseFiveJobRunA
|
||||
- name: PhaseFiveJobA
|
||||
alias: PhaseFiveJobRunB
|
||||
|
Loading…
x
Reference in New Issue
Block a user