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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.