Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to access multiple repositories from a self-hosted pipeline?

Kaspar Vibur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 30, 2023

I have a self-hosted pipeline runner and from there I would like to run another pipeline that relies on the same self-hosted runner. Is that possible? 
If yes, following the guide trigger-pipeline guide:

https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/trigger-pipeline

What should I specify as "pipe:" value?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 31, 2023

Hello @Kaspar Vibur and thank you for reaching out to Community!

If you only have one runner available, and the second pipeline would rely on the same runner, it would not be possible.

This is because each runner can run only one pipeline step at a time, meaning that the first pipeline would already be making the runner "busy", and once it triggers the second pipeline, there will be no available runner to assign it.

However, if you create and spin up more than one runner (you can execute multiple runners in the same host, or use different hosts), then you should be able to achieve the workflow you are looking for. Following is an example of using the pipe in a step with runners : 

- step:
       runs-on:
        - 'self.hosted'
        - 'linux'
       script:
- echo "This step runs in a self hosted runner"
        - pipe: atlassian/trigger-pipeline:5.2.0
          variables:
            REPOSITORY: '<string>'

Hope that helps! Let me know in case you have any questions.

Thank you, @Kaspar Vibur !
Patrik S

Kaspar Vibur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2023

Thank you @Patrik S for your reply! I had set up a separate runner for the other repository but once I got the configuration correct I was presented with the following:

 

Configuration error

The Pipes feature is not supported on this self-hosted runner's platform.

So that I belive answers the question for my self-hosted MacOS runner.

My binary app project compiles sources from multiple repositories and as far as I understand now the only option to compile using pipeline would be to clone those other repositories into the runner.

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 31, 2023

Hello @Kaspar Vibur ,

It seems like you are using MacOS runners, and pipes are currently supported only on Linux Docker runners, as they rely on docker containers to properly work (see Unsupported feature | MacOS Runners)

In this case, you can either call the API to Run the pipeline directly in your step's script: 

or, as you mentioned, manually clone the other repositories you need during your build.

Thank you, @Kaspar Vibur !

Patrik S

Like Kaspar Vibur likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events