I’m having difficulty importing a pipeline from another repository. I’ve checked it using the validator and it’s valid, but when I push to the development
branch, no pipeline is triggered.
I need the pipeline to be triggered when I merge a pull request into the development
branch, and the same goes for the production
branch.
here's my shared pipeline
export: true
hi all.
based on bitbucket team, this config work on me.
repository shared-pipeline-config > bitbucket-pipeline.yml
export: true
definitions:
pipelines:
share-pipeline-1:
- step: &build-and-push
name: Build and test
image: docker:20.10.16
services:
- docker
caches:
- docker
script:
- docker version
repository backend-service > bitbucket-pipeline.yml
pipelines:
branches:
development:
import: shared-pipeline-config:main:share-pipeline-1
production:
import: shared-pipeline-config:main:share-pipeline-1
Hi @Indra Rizky
The reason that it's not triggering on a branch push, is because you have defined the shared pipeline using the custom tag. This means the pipeline will only run when manually triggered (via the UI or API), not automatically on branch pushes or merges.
To trigger a pipeline automatically when you merge into development
or production
, you need to define the import under the branches
section:
pipelines:
branches:
development:
import: projectname/shared-pipeline-config:main:share-pipeline-1
production:
import: projectname/shared-pipeline-config:main:share-pipeline-1
This will ensure the pipeline runs on any push (including merges) to those branches.
I hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Ben , thanks for the answer
i already tried it, now pipeline was triggered but somehow the pipeline shows error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Indra Rizky
To investigate this further - we need access to your workspace, including your YAML configuration and build environment/build logs.
To do so - we will need you to raise a support ticket with our support team using your Premium workspace URL:
Please let me know if you encounter any issues raising a ticket, and I will raise one on your behalf.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure thing @Indra Rizky
May I know your timezone and working hours? I have noticed with past support tickets that you have raised these around 2-3 am (GMT+10), so I want to make sure that you receive support from the region that works within your typical hours.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Ben
when I try to create a ticket at
I’m can only redirected to the community and documentation, which are not very helpful. Could you help me open a support ticket regarding this pipeline issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Indra Rizky
I've already raised a ticket on your behalf some hours ago - you will receive a response shortly. Please monitor your email inbox for the email account you have used to raise this ticket.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.