Bitbucket Pipeline : Is there any way to skip the deploy step to the Dev environment & directly deploy to Stage / prod environment using manual triggers
Like in Gitlab pipeline, we can directly deploy to which ever environment we like dev/stage/prod etc.. by skipping the deploy step to Dev/stage using manual triggers after the build is succeeded.
Below is my pipeline, here i directly want to deploy to stage after build and i want to skip the Dev deploy step.
image: node:14.17.1
pipelines:
branches:
develop:
- step:
name: build
script:
- ......
artifacts:
- .....
- step:
name: DEV-Deploy
deployment: Dev
trigger: manual
script:
- .....
- step:
name: STAGE-Deploy
deployment: Stage
trigger: manual
script:
- .....
Please advise..
Thanks
Hey Chanakya,
If you would like to set up a manual trigger to deploy to an environment such as staging/production - you can try using the "custom" tag within the bitbucket-pipelines.yml file.
The "custom" tag allows you to select the pipeline step whenever you like manually from the drop-down list within Repository > Pipelines > Run Pipeline - you can run this against any branch within your repository accordingly.
More information can be found here:
https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/
For example:
custom:
manualdeploy:
- step:
name: 'Manual Build'
deployment: staging
script:
- <Script goes here>
Hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.