Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger multiple shared pipeline to simplified bitbucket-pipeline.yml

Indra Rizky
December 6, 2025

Hello Team Bitbucket, I would like to ask, is it possible to trigger a shared bitbucket pipeline more than one?

 

let say i have bitbucket-pipeline.yaml in shared-repo-config

definitions:
pipelines:
share-pipeline-code-checker:
- step:
script: npm run test
shared-pipeline-build:
- step:
script: docker build

 

i want to trigger share-pipeline-code-checker only when pr is create, and trigger share-pipeline-code-checker and shared-pipeline-build when pr is merge.

i've done create bitbucket-pipeline.yaml in main-repo like this and doesnt work

pipelines:
pull-requests:
'**':
import: shared-pipeline-config:main:share-pipeline-code-checker
branches:
development:
import:
- shared-pipeline-config:main:share-pipeline-code-checker
- shared-pipeline-config:main:share-pipeline-build

or something like this, doesnt work either

pipelines:
pull-requests:
'**':
- import: shared-pipeline-config:main:share-pipeline-code-checker
branches:
development:
import: shared-pipeline-config:main:share-pipeline-code-checker
import: shared-pipeline-config:main:share-pipeline-build


Because I believe there would be a lot of repetition if I could only trigger one shared pipeline. Based on my example above, I would also have to create the share-pipeline-code-checker step inside the share-pipeline-build, which is not effective. Or, is this possible? can we request feature like this in bitbucket pipeline ? 

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2025

Hey @Indra Rizky 

Currently, Bitbucket Pipelines does not support triggering multiple shared pipelines in a single trigger (like a PR or branch event) you can only import one shared pipeline per trigger.

To avoid duplicating steps, it is best practice to define reusable steps in your shared configuration and create composite pipelines that combine these steps as needed. Then, import the appropriate single pipeline for each trigger in your main repository.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events