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

Bitbucket pipeline - How do i skip the deploy step to Dev & directly deploy to required environment.

Chanakya April 5, 2022

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

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2022

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)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events