Expose run_if in Workflow editor

step

#1

Instead of having to manage run_if only in yml, it would be great to have access to this in the visual editor.


Run_if Workflow editor support
Add if-else paths to the workflow
Allow only running a step if the previous step failed
Run_if Workflow editor support
#2

Thanks for the #feature-request @dpalmer - don’t forget to vote on it! :wink:


#3

It’d be awesome if the Workflow editor supported displaying / editing “run_if” Currently, that seems possible only by directly editing the yaml.

  teardown_workflow:
  steps:
  - slack:
    is_always_run: true
    run_if: ".IsBuildFailed"
    inputs:

http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/#run-a-step-only-if-the-build-failed


#4

Good idea!


#5

I’m wondering if run_if is possible in workflows. My use case:

  • Root setup for build, same for all releases
  • Simple script runs to determine if codepush is possible
  • If codepush is possible, I’d like to run a workflow to codepush to ios and android.
  • If codepush is not possible, I’d like to run a workflow which releases to TestFlight/beta if on staging branch, and to the App Stores if on master branch.

I suppose I’m also curious if a workflow can be used as a step during another workflow. I can only see the run_before and run_after configurations right now


#6

@ntomallen you can use run_if for that marking every related (conditional) step with run_if - you’d use a single workflow for that.

You can also bitrise run another workflow from a script if you store the yml in the repo - related blog post: https://blog.bitrise.io/run-a-workflow-from-your-repository

If you’d need more info we’re happy to help, but please create a separate thread here on discuss.bitrise.io as this doesn’t seem to be related to this #feature-request :wink:


#7

@viktorbenei is it possible that this could be done by ourselves if we got our hands dirty in: https://github.com/bitrise-io/bitrise-workflow-editor ?


#8

Sure, it’s an open source project.

Keep in mind we don’t expose run_if as just a text field because based on our experience, less experienced users would be tempted to change it in a way that breaks things.

So, before sending a PR into that repo I’d suggest you to share some sketches or description of what your solution would be, to make sure you don’t implement something e.g. our UX/designer team will reject :slight_smile:

Of course if you have any questions feel free to ask, we’re always happy to answer/help! :wink:


#9

@ghangyas 's idea was to have a switch in the editor directly, to switch to yml mode for just the selected step. Basically select the step in the editor just like you do today, which results in the inputs & details of the step on the right side. Add a switch/toggle there to switch the right side panel (where the inputs are) to YML mode, where you could edit the YML directly for that step!


#10

I think GUI support makes sense. Maybe hide it behind an advance mode toggle or something.


#11

Yeah, we definitely need this feature!