You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Right now, a pipeline runs as soon as a Pull Request is created. Meaning, it runs before the pull request has been approved or merged. This is not ideal - what if the pull request requires revisions?
Is there a way to specify in the `bitbucket-pipelines.yml` to only deploy upon a merged pull request, rather than as soon as the PR is created?
My current pipeline looks like this:
pipelines:
pull-requests: # The branch pattern under pull requests defines the source branch.
dev:
- step:
name: Deploy to Production
deployment: Production
script:
- do stuff
- deploy stuff
services:
- docker
For example, in github actions, you can do something like:
prod-push:
if: github.event.action == 'closed' && github.event.pull_request.merged == true
Sounds like you want the pipeline to run off of the merge to main, not on the pull request. Something like:
pipelines:
branches:
main:
- step:
name: Deploy to Production
deployment: Production
script:
- do stuff
- deploy stuff
services:
- docker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.