Jenkins Pre-Build and Post-Build in Multi-Configuration Job

Jenkinsjenkins-dockermulti-configuration

We use multi configuration job to test various combination of 2 separate components for compatibility test. These are our compatibility acceptance tests. We perform the following steps

  1. Prepare test environment using docker and docker-compose where we deploy these components. (Pre build for us)
  2. Run multi configuration job to test compatibility
  3. Clean up – stop containers(Post build)

We have dedicated jobs for step 1 and 3 and use multijob for consolidated view.

Is it possible to have a consolidated one job which does that ? Possibly

  1. Before starting the parent job of multi configuration, we set our environment.
  2. Run all combinations of multi configuration
  3. Parent job post build does clean up.

Best Answer

You can use "Prepare Env for the run" to setup your environment and using the "Trigger builds on other project(Build Step)" combinations of multi configuration can be run, and at the end with in the same job using Post build actions should be able to cleanup can be done.

Related Topic