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.
Is it possible to make a pipeline short and clear like this?
pipelines:
default:
- parallel:
- step:
name: Security Scan
script:
- echo "security test all branches"
- step:
name: Lint the node package
script:
- echo "lint test all branches"
branches:
'{develop,master,staging}':
- step:
name: Build image
trigger: automatic
script:
- echo "building image"
staging:
- step:
name: Deploy to staging
trigger: automatic
script:
- echo 'branch is deployed automatically'
'{develop,master}':
- step:
name: Deploy to current branch env
trigger: manual
script:
- echo 'branch is deployed manually'
Instead of duplicating build and all other default steps inside all branches steps?
If i run the code above the jobs which are in the Default will be not triggered for specific branches. Specifying all these steps with anchors or duplicating them somehow is a bit messy.
Do i have an option to specify jobs for all pipelines AND another job for a specific branch?
Thank you.
Thank you. I did in the same way, but faced the problem of adding Deployment flag with variable to the steps. So in the current situation i have two choices 1) Mess in global pipeline variables but readable yml 2) Mess and lot or repeats in yml but split variables for each `deployment`.
Hi Pavel,
Thank you for your reply. Are you doing deployments to more than one environment?
I'm not sure if you want manual_deploy and auto_deploy to deploy to the same or a different environment, and whether they have the same script or not. It would be useful to have a bit more context, so we can see how to address this.
Kind regards,
Theodora
Thank you for your response.
Yes, you are right, the manual and auto-deploy have only one difference - manual or auto-trigger for deployment. And yes, we are deploying to the different environments and we would like to have several "deployment" scopes with the variables but needs to reuse the yml steps. But as you can see on a screenshot we can not utilize "deployment" flag.