JobAlias in MultiJob

36 views
Skip to first unread message

marouane zhani

unread,
Nov 10, 2021, 12:08:14 PM11/10/21
to job-dsl-plugin
Hi Guys,

Do you know if there is any possibility to add job alias to a multijob phase job using jobDSL ? 
As you know this is helpful to see a good overview of the Multijob, especially when working with the same job multiple times with different configurations. 

Thanks in advance

Piotr Marcińczyk (piomar123)

unread,
Dec 7, 2022, 5:25:14 AM12/7/22
to job-dsl-plugin
Hi, I was looking for the same and after some research I succeeded with the following code:

    steps {
        phase('Name of the phase') {
            phaseJob('my-job') {
                configure {
                    phaseJobConfig ->
                    phaseJobConfig / jobAlias << 'custom-alias'
                }
            }
        }
    }

Hope this helps.
Cheers,
Piotr
Reply all
Reply to author
Forward
0 new messages