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.
I want to limit certain step to specific branches
pipelines:
branches:
'{feature/*,release/*,hotfix/*,bugfix/*}':
- step: # Generates credential needed for test and building
script:
- echo "All branch, this step is needed for release"
- parallel:
script: # Some lint and unit test script
- echo "All branch, this step is needed for release step"
'{release/*}':
- step: # Actual test and build script
script:
- echo "Only in release branch"
In the above sample I want the first step to run in almost all branch, but the second step should only execute for release branches pattern. Unfortunately the actual result was the first step only works in branches like hotfix and never gets trigger in release/version-name when branching out. How is it supposedly done? Basically the idea is to reuse the first two steps above on release branches, so no need to duplicate those steps.
Hi Jensen, I think you should use yaml anchors to define the common steps and reuse them in the appropriate pipelines - `release/*` or `hotfix/*`.
Ref: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.