Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

Stage option in custom branch

Edited
In structure with custom where possible to use -stage option (multi-step deployment)?

pipelines
:
custom:
dev:
- step:
<<: *save-env-variables
deployment: development
- step: *restart-api
....
branches:
dev:
- step*build-api
- parallel:
- step: *deploy-api
step: *deploy-services

Also how to change VS Code bitbucket scheme to correctly work with "stage option" which in beta? Or maybe exist shema for beta version?

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 03, 2023

Hello @Vadym Polietaiev !

And thanks for reaching out to Atlassian Community!

It's definitely possible to use stages in custom-triggered branches to have multi-step deployments.

From your example YML file, I see you are also leveraging YML anchors to define the steps, so let me share with you an example using a custom-triggered pipeline containing a normal step, and a deployment stage using step anchors : 

definitions:
  steps:
    - step: &deploy
        name: Deploy
        script:
          - echo "Deploying"
    - step: &restart-services
        name: Restart services
        script:
          - echo "Restarting services"

pipelines:
  custom:
    dev:
      - step:
          name: Build and test
          script:
            - echo "Building and testing"
      - stage:
          name: Deploy to test environment
          deployment: test
          steps:
            - step: *deploy
            - step: *restart-services

 You can find additional examples of using stages in our official documentation below : 

Also, while creating/editing your YML file, if you would like to validate if the syntax is correct before pushing it to the repository, I recommend using the Bitbucket Pipelines validator tool, so if there is any syntax error in the YML file you can catch it beforehand.

Hope that helps! Let me know in case you have any questions.

Thank you, @Vadym Polietaiev !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events