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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to trigger a pipeline on Pull Request Merge

I want a pipeline to trigger automatically when Pull Request is CLOSED/Merged.

1 answer

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 23, 2022

@Ronak Toshniwal  hi. Thanks for your question. Check this guide:

 

image: node:10.15.0

pipelines:
default:
- step:
name: Build and test
script:
- npm install
- npm test
branches:
staging:
- step:
name: Clone
script:
- echo "Clone all the things!"

 Regards, Igor

Hi igor
Thanks for the answer 
i want to know how to fire pipeline when PR IS MERGED 

currently it is running on PR creation.

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 04, 2023

@Ronak Toshniwal  check in example this:
https://bitbucket.org/atlassian/aws-cloudformation-deploy/pull-requests/51

Initial build when pr created was this one:
https://bitbucket.org/atlassian/aws-cloudformation-deploy/pipelines/results/334

And when pr was merged next build ran:

https://bitbucket.org/atlassian/aws-cloudformation-deploy/pipelines/results/335

And configuration is the next:

pipelines:
default: -- when pr created
- <<: *setup
- <<: *test
- <<: *release-dev
branches:
master: -- when pr merged to master
- <<: *setup
- <<: *test
- <<: *push

 Regards, Igor

Like Ronak Toshniwal likes this
Like Igor Stoyanov likes this

Is it possible to catch a "Decline" event?

Regards.

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 19, 2023

@O Devops hi. If i correctly understood you, when pull request declined, then no merge happened, so no pipeline triggered.

Regards, Igor

Suggest an answer

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

Atlassian Community Events