Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post-build Actions for Jenkins multi-configuration job

I am trying to perform some post build actions in a multi-configuration job, for example, check the status of configuration after all the configs are finished, and execute some scripts if any of them completed with result FAILURE.

However if I set a Post Build Task, it will be performed after the build process of each configuration, not after the parent job.

Other post build action like trigger builds on other projects can only be performed after parent job, and Editable email notification can trigger email for matrix projects or parent job only. So I think there might be a way that I can run script only after parent job.

Does anybody have a solution?

like image 680
Sugre Avatar asked Feb 06 '14 10:02

Sugre


People also ask

Which task is involved when configuring multi configuration jobs in Jenkins?

Jenkins provides multi-configuration project. With this option we can create only one job with many configurations. Each configuration will be executed as a separate job. This is exactly what we need to simplify our scheduled tests, which can be used in conjunction with TestComplete or TestExecute.

Which of the following steps comes under post build actions?

Post build action is ALWAYS executed. There is where you send emails, archive artifacts, send artifacts to master (if using slaves and have the plugin), etc. I use the Post build Step to tag/label the successfully built source code in my GIT workspace.

What is pre build actions in Jenkins?

How to install. This plugin allows build step to run before SCM checkouts so that you perform any build step action on the the workspace, (cleanup, add a file with some settings for the SCM, etc) or call other scripts that need to be run before checking out from the SCM.


1 Answers

You can use the Multijob plugin which allows you to place jobs in phases

For example, matrix job in phase 1.

After that you can add additional phases of other jobs or just add build/postbuild steps as you can in a freestyle

Incidentally, you do not need to trigger additional jobs with this plugin, just add them in as additional phases. Jobs within phases run in parallel and phases run sequentially

like image 194
KeepCalmAndCarryOn Avatar answered Sep 30 '22 18:09

KeepCalmAndCarryOn