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
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
I want to limit certain step to specific branches
- step: # Generates credential needed for test and building
- echo "All branch, this step is needed for release"
script: # Some lint and unit test script
- echo "All branch, this step is needed for release step"
- step: # Actual test and build 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/*`.