Pipelines manual steps for confidence in your deployment pipeline

Bitbucket Pipelines gives you the ability to build, test and deploy from directly within Bitbucket Cloud. Today, we’re excited to announce that you can now use manual steps in Bitbucket Pipelines. With manual steps, you can customize your CI/CD pipeline by configuring steps that will only be run when manually triggered by someone on your team.

This is a great addition for teams that require some manual process (e.g. manual testing) as a prerequisite to deploying their software. You can simply configure the deployment steps as manual steps, then trigger the deployment once the necessary testing or other activities have been done.

Manual steps can also be used as an optional final step for additional automated testing. In cases where certain types of automated tests are expensive or time-consuming to run, adding them as a final manual stage gives your team the discretion in when to run these tests.

To configure a step in your pipeline as manual, add trigger: manual to the step in your bitbucket-pipelines.yml file. The pipeline will pause when it reaches the step until it is manually triggered to run through the Pipelines web interface.

Below is an example bitbucket-pipelines.yml file which uses manual steps for the deployment steps.


image: python:3.6.3
 
pipelines:
  default:
    - step:
        name: Build and push to S3
        script:
          - apt-get update
          - apt-get install -y python-dev
          - curl -O https://bootstrap.pypa.io/get-pip.py
          - python get-pip.py
          - pip install awscli
          - aws deploy push --application-name $APPLICATION_NAME --s3-location s3://$S3_BUCKET/test_app_$BITBUCKET_BUILD_NUMBER --ignore-hidden-files
    - step:
        name: Deploy to test
        script:
          - python deploy_to_test.py
    - step:
        name: Deploy to staging
        trigger: manual
        script:
          - python deploy_to_staging.py
    - step:
        name: Deploy to production
        trigger: manual
        script:
          - python deploy_to_production.py

Manual steps are designed as a replacement for using custom pipelines to trigger deployments, and we’ll be adding future enhancements to support tracking these deployments in the coming months. Custom pipelines remain primarily as the method of configuring scheduled builds, and also for running builds for a specific commit via the Bitbucket API.

For more information on manual steps and how to configure them, check out our documentation. For help configuring Pipelines to perform deployments, check out our deployment guides for your preferred platform.

We hope you like this addition to Pipelines. Happy building!

 

Learn more about Pipelines