Dynamically Change Job Name

20 views
Skip to first unread message

JJ

unread,
Mar 10, 2017, 9:55:35 AM3/10/17
to Jenkins Users
Does anyone know how to do this:

Use Case

Job Name: ABC-JOB 

ABC-JOB can be used by dozens of teams, at any time. If submissions of ABC-JOB are made while one is running, they will queue up until the one executing finishes because multiple jobs with the same name cannot run simultaneously.

I want to create a job that calls ABC-JOB but dynamically changes the name of the job so they don't queue up. For example, three people submit the job that triggers ABC_JOB.  Instead of 3 instances of ABC_JOB submitting, with two of them in a queue status, the trigger job would name them:
ABC_JOB_appl1, ABC_JOB_appl2, and ABC_JOB_appl3 so they can run concurrently.

Thanks in advance for your help.

Richard Ginga

unread,
Mar 10, 2017, 10:50:02 AM3/10/17
to jenkins...@googlegroups.com
there is a "Execute concurrent builds if necessary" check box in freestyle builds that will enable this

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4f135c9d-252e-4e3e-95c1-2c63ec62ad73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dick Ginga
Build Engineer

Maciej Jaros

unread,
Mar 10, 2017, 12:25:23 PM3/10/17
to jenkins...@googlegroups.com


JJ (2017-03-10 15:55):
You might also want to set build description as a first build step. That way you will see which parameters where used when building.


Here's what I do (you might do it in one step with Groovy):

Reply all
Reply to author
Forward
0 new messages