How to trigger multiple workflows at the same time

I’ve just corrected that fragment.

1 Like

Thanks! :wink:

Hi @koral, I’m totally new to Birise and would love if could share a .yml file with the second approach, maybe in a public repository. Thanks.

1 Like

Now, there is a step for that in the Steplib. It is called Trigger Bitrise workflow.

4 Likes

@koral I’ll take a look to the docs to see if I can find something related. Thank you so much.

In the Trigger Bitrise workflow, is the Workflow ID the same as the Workflow Name?

Yes, ID is the same as name in case of workflow.
In the API documentation it is called ID:
http://devcenter.bitrise.io/api/build-trigger/#bitriseio-specific

2 Likes

One question: Is it also possible to use the utility workflows approach, if the after_run workflow is configured to use a different stack? My use case is a command line tool and I want to run tests both on macOS (workflow macOS) and on Linux (workflow Linux) which both run on different stacks. Is this possible using the utility workflow approach?

Hy! yes with different workflows you can set up different Stacks. to both macOS and linux.

Yea, you can set them but they won’t be used in the way @jamitlabs expect.
Basically utility workflow runs on the same machine as its parent. So its stack setting is ignored.

I would say that it may be a bug in workflow editor GUI that you can set stack for utility workflow. What do you think @viktorbenei ?

1 Like

Indeed, @koral is right @fehersanyi-bitrise , a build right now can only use a single stack, even if you use multiple workflows in it with different stacks. The triggered workflow’s stack will be used for the whole build.

The only way to use different stacks is to trigger a second build at the moment, as stacks are defined on a build level.

@koral well even if it’s not a bug, as technically it’s accepted, I agree that removing it from the UI would be a good idea as it might be confusing.

1 Like

Hey guys,
I’m trying figure out how can I run a few workflow parallel. I’m following the guide : https://blog.bitrise.io/start-multiple-builds-with-the-same-trigger
Everything is clear for me but the case what I want is a bit different.
I have workflows Trigger, AndroidFlavor1, AndroidFalvor2. The Trigger workflow will be triggered by event from github. The first step in that workflow is git clone repository second is Bitrise Build Start where I defined workflows that should be running in parallel (AndroidFlavor1, AndroidFalvor2). The idea is that both Android workflow uses the same code from the same repository. I want clone the repo once and run these two workflow which use the code from previous step. The problem is Android workflows fails because they can’t find code to build an app.

From guide: " This step will clone the build it is running in, but with another workflow(s) …". Correct me if i’m wrong. When I run Trigger workflow and everything what happens in that workflow should be shared with workflow AndroidFlavor1 and AndroidFlavor2. right?

Hey @rusmichal!
If you want to trigger the 2 builds at the same time, you can use two Bitrise Start Build steps, but both needs to clone the repo.

Hey
Thanks for your reply. I thought i can avoid cloning repository for any parallel workflows.

Hey!
You are welcome, the thing is that the two new workflows will start up in two totally new and different vm-s so they will not have the repo’s cloned there by a trigger workflow.

1 Like

Following up on this. It looks like this article: https://blog.bitrise.io/start-multiple-builds-with-the-same-trigger which says " This step will clone the build it is running in , but with another workflow(s) you’ve already defined and then it’ll start running these in parallel and not in succession. The build in which the step is will wait for the other(s) to finish and then if all of", it looks like I shouldn’t need to clone my code twice anymore. Can anyone confirm?

Hi @nick.teissler,

This definitely shouldn’t require you to clone your code twice :slight_smile:

Thanks @bitce, is there any updated documentation for that? It looks like the “wait for step” is redundant now, and I’m still having to clone twice :frowning:

Hi @nick.teissler,

Can you please raise your problem in either a different #issues thread or on our on-site chat? I’m not fully understanding what you’re referencing here or why exactly you’d have to clone the same repo twice in any scenario

Followed up here: Workflows triggered from "Bitrise Build Start" don't clone the triggering machine