How to conditionally build other projects?

If I understood it correct you should be able to do this by following these Steps:

  1. First Build Step:
    1. Does the regular work. In your case: building, unit testing and packaging of the web application
    2. Depending on the result let it create a file with a specific name.
    3. This means if you want the low-risk-change to run afterwards create a file low-risk.prop
  2. Second Build Step:
    1. Create a Trigger/call builds on other projects Step from the Parameterized-Trigger
      plugin.
    2. Entery the name of your low-risk job into the Projects to build field
    3. Click on: Add Parameter
    4. Choose: Parameters from properties File
    5. Enter low-risk.prop into the Use properties from file Field
    6. Enable Don’t trigger if any files are missing
  3. Third Build Step:
    1. Check if a low-risk.prop file exists
    2. Delete the File

Do the same for the high-risk job

Now you should have the following Setup:

  • if a file called low-risk.prop occurs during the first Build Step the low-risk job will be started
  • if a file called high-risk.prop occurs during the first Build Step the high-risk job will be started
  • if there’s no .prop File nothing happens

And that’s what you wanted to achieve. Isn’t it?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)