Allow disabling a step in the workflow


#1

From Tamas on 2015/12/04 21:41:34 +0000

I haven’t found a way to temporarily disable a step in the workflow. If I just want to do a shortcut build (e.g. with the tests disabled… psst! ;)) I’d like to do that without having to delete a step then readd/reconfigure it again.

Copied from original feature request: http://bitrise.uservoice.com/forums/235233-general/suggestions/10970361-allow-disabling-a-step-in-the-workflow


#2

From Anonymous on 2016/10/19 14:58:07 +0000

+1 would be awesome if this can be done from the ui.


#3

From Angus Johnston on 2016/05/21 11:25:56 +0000

Microsoft VSTS has a right click -> "disable" for any item in the workflow. it then dims the workflow item too so its easy/quick to recognise that it wont run. It's a really handy feature would be great to see it in Bitrise


#4

From Brandon Minnick on 2016/05/19 17:50:41 +0000

Thanks for the link! It'd be great to have this as an option in the Workflow Editor GUI too!


#5

From Bitrise on 2016/05/03 08:04:09 +0000

One more note: you can do this in bitrise.yml mode, with a simple run_if. You can find a guide on our DevCenter: http://devcenter.bitrise.io/docs/advanced-tips-tricks-for-bitrise-cli-workflows#section--temporarily-disable-a-step


#6

From Bitrise on 2016/03/17 18:25:29 +0000

Thanks for the request, it's a great idea! Just wanted to note that you can do this in the bitrise.yml mode, in the Workflow Editor:

Just add a run_if: false expression to the step you want to skip. If a run_if expression is defined it'll be evaluated (the result have to be a boolean) before running the step, and if it evaluates to false then the Step will be skipped.

You can find examples for run_if on GitHub: https://github.com/bitrise-io/bitrise/blob/master/_examples/experimentals/templates/bitrise.yml


#7

Yes would be nice to be able to disable a step temporarily .
For instance i m testing a new “step chain”, I would like to disable Slack notification during my tests. Just a switch ON/OFF would be great :slight_smile:

Regards,
Frederic


#8

Definitely on our list! :slight_smile: In the meantime run_if can be used for that (:point_up: Allow disabling a step in the workflow)


#9

Oh yes I don’t know why / how I missed it :thinking:
So just a little switch in the UI would be perfect then


#10

Got it, thanks for the feedback @SkyFred27! :wink:


#11

+1 :slight_smile:


#12

Is it possible to use env variable? Because I receive:

Step failed, error: template: EvaluateTemplateToBool:1: undefined variable “$Variable_name”


#13

Hello @stepan.zubachyk!

yes it is possible, you can set env vars in the workflow editor or in script steps with envman like this:
envman add --key ENV --value "test"
so you get $ENV that is test


#15

Already did this, but it seems that it’s not working only for run_if case.
Tried these cases:
run_if: $UPLOAD_TO_APPSTORE,
run_if: "$UPLOAD_TO_APPSTORE",
run_if: "${UPLOAD_TO_APPSTORE}"


#16

it should be

run_if: |-
 	{{enveq "UPLOAD_TO_APPSTORE" "true"}}

based on this doc https://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/#disable-a-step