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
I have a bitbucket pipeline file as below;
pipelines:
branches:
dev:
- step:
name: Test1
script:
- echo "Test"
dev:
- step:
name: Test2
script:
- echo "Test"
Hi @Aashish41 and welcome to the community!
I don't believe that this is possible, however, a pipeline for a certain branch can have multiple steps.
If you want to execute both steps when a commit is pushed to dev branch, you can modify your bitbucket-pipelines.yml file as follows:
pipelines:
branches:
dev:
- step:
name: Test1
script:
- echo "Test"
- step:
name: Test2
script:
- echo "Test"
Is this what you are looking for?
Kind regards,
Theodora
Hi @Theodora Boudale , Thank you for your response.
I have already opted using multiple steps for a single branch. I just wanted to know if it is possible to use same branch multiple times. Unfortunately, it is not possible.
Anyway your response was helpful for me.
Have a great day !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there an alternative other than you create a unique branch name for your pipeline?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tridev,
You can create (multiple) custom pipelines:
Please keep in mind though that these can only be triggered manually or on a schedule, they don't run automatically on every push.
It is also possible to configure a default pipeline that will run automatically on every push if no branch-specific pipeline is defined:
The page I shared has all available options about Pipeline start conditions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Theodora Boudale for your quick response.
I will go through this and let you know if any confusion arises.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had below requirements:
1. whenever the master/ hotfix branch is pushed it should be deployed in UAT environments.
2. After the QA team verifies the changes in UAT, the master branch should be deployed into production
since I couldn't use the same branch name in the pipelines.
I used the custom pipeline to build and deploy in the production.
I also added a manual trigger in the deployment step and ensured it is only deployed by certain individuals.
Thanks @Theodora Boudale
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.