I'm trying to create pipelines and execution flows. To do this, I'm using 
the Job Generator Plugin to create jobs from 'templates'. This is mostly 
working just fine, except my first pipeline step needs to trigger the 
second pipeline step automatically. This is easily achieved by using a 
"trigger parameterized build on other projects" post-build task, but I 
don't seem to be able to template this up suitably in a jobgenerator.

My initial jobgenerator job has two generator parameters (PROJECT, and 
PROJECT_TYPE), and creates a job called 
"unit_test_${PROJECT}_${PROJECT_TYPE}". My parameterized build task is 
called "dev_deploy_${PROJECT}_${PROJECT_TYPE}", which is the next step in 
the pipeline from the one this template will create.

When first run, on an otherwise clean Jenkins, the 
"unit_test_${PROJECT}_${PROJECT_TYPE}" job (actually called 
"unit_test_fancy_theme") is created correctly. Another jobgenerator job 
creates "dev_deploy_${PROJECT}_${PROJECT_TYPE}" (actually called 
"dev_deploy_fancy_theme"), and all looks just fine. If I run 
"unit_test_fancy_theme", it correctly kicks off a "dev_deploy_fancy_theme" 
as well.

However, if I ever run my jobgenerator templates again, they (correctly) 
don't create real jobs, but of course, they execute the paramaterized 
trigger, which now exists, and so the "dev_deploy_fancy_theme" is run 
before the unit_test_fancy_theme job, which screws up the pipeline.

So in short... is there a way to have post-build steps in jobgenerator jobs 
that don't execute when the generator is run, but do execute when the 
generated job runs? Any ideas would be most welcome!

Cheers,

...Ralph

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to