Trigger Jenkins job name using environment variable

77 views
Skip to first unread message

pim...@gmail.com

unread,
Nov 12, 2015, 1:48:19 PM11/12/15
to Jenkins Users
Jenkins 1.6.35
Windows Server 2012 R2

Hi,

Here is the scenario:

Job A: Paramterized job; solicits input from user (e.g. connection info, target action).

Depending on the action the user selects in job A, I need to trigger either job B, job C, job D, etc. I am trying to do this using a Post-Build action on job A of Build other projects. I specify prefix_%MYACTION% as the job name, but it appears jenkins is unable to evaluate the value dynamically (post-build). I guess it  tries to parse it before the job is even run, and since it considers it an invalid job name, it never triggers job B.

I can change job A to trigger whatever job I want as a conditional build step (e.g If %MYACTION% == "DOTHIS" trigger job B), but that does not run the downstream job interactively, and therefore job B does not prompt the user for the values it needs.

Any ideas on how to accomplish this?

Thanks,
Rob
Reply all
Reply to author
Forward
0 new messages