Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - trigger post-build action based on parameter

Tags:

I have a Jenkins job set up that builds my iOS Xcode project and archives the resulting IPA file. In addition, I have also installed the Testflight plugin to upload the IPA file as a post-build action. That's all working fine, and my question is this...is there a way to only trigger that post-build action based on the result of a boolean build parameter. There are certain cases where I need to be able to build an IPA and I don't want it to be uploaded to Testflight. If I could just add a checkbox at the start of the build that determines whether or not to upload to Testflight that would be ideal.

Thanks.

like image 667
JGATX Avatar asked May 04 '12 15:05

JGATX


People also ask

How do you trigger a build with parameters in Jenkins?

In your Jenkins job configuration, tick the box named " This build is parameterized ", click the " Add Parameter " button and select the " String Parameter " drop down value. Latest Jenkins docs say that GET is depreciated for security reasons, so POST should be preferred.

How do I trigger a build automatically in Jenkins?

Follow the steps as mentioned below to trigger a Jenkins job automatically based on GitHub's webhook configurations: Step 1: Go to the Configuration page of the respective job and under the build trigger section, check the "GitHub hook trigger for GITScm polling" checkbox and click on the Save button.


1 Answers

Flexible Publish plugin supports Run Conditions. Never tried it myself, but heard good things about it from others.

like image 147
malenkiy_scot Avatar answered Sep 22 '22 03:09

malenkiy_scot