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
From Anonymous on 2016/10/19 14:58:07 +0000
+1 would be awesome if this can be done from the ui.
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
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!
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
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
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
Regards,
Frederic
Definitely on our list! In the meantime
run_if
can be used for that ( Allow disabling a step in the workflow)
Oh yes I don’t know why / how I missed it
So just a little switch in the UI would be perfect then
Got it, thanks for the feedback @SkyFred27!
+1
Is it possible to use env variable? Because I receive:
Step failed, error: template: EvaluateTemplateToBool:1: undefined variable “$Variable_name”
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
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}"
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
I’m surprised that this useful option is still not available…
Also super keen on this feature, the yml file is not as nice to edit as a toggle would be
+:100: for this feature!
Totally agree, this would be a super useful feature as we are building workflows that depend on other workflows and don’t want to unnecessarily repeat any steps!
This would be great, +1