Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,373
Community Members
 
Community Events
176
Community Groups

Can we use same branch name twice on a bitbucket pipeline file?

Aashish41 I'm New Here Nov 30, 2022

I have a bitbucket pipeline file as below;

pipelines:

    branches:

      dev:

        - step:

            name: Test1

            script:

              - echo "Test"  

      dev:

        - step:

            name: Test2

            script:

              - echo "Test"
 When the pipeline is triggered only first step runs i.e. Test1 but Test2 doesn't. Is there any way that I can use same branch name twice?

1 answer

1 accepted

0 votes
Answer accepted

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

Aashish41 I'm New Here Dec 06, 2022

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 !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events