Bitbucket Deployments

On this page

Track the deployments you execute through Bitbucket Pipelines and give your team insight into the status of your deployment environments and visibility over what code changes land in each environment.

Bitbucket Deployments supports deploying to the following three environments:

  • test
  • staging
  • production

Get started with Bitbucket Deployments

If you haven't configured Pipelines to perform deployments, refer to our deployment guides for your preferred platform.

Step 1: Enable Bitbucket Deployments

Click Deployments in the repository sidebar to start the set up process. If you're viewing Deployments for the first time, click Go to .yml file to configure your bitbucket-pipelines.yml file.

Step 2: Configure your deployment steps

Modify your bitbucket-pipeline.yml file to add deployment: test to the step that performs the deployment to your test environment. Bitbucket Deployments supports deploying to the teststaging and production environment.

Commit the update to your bitbucket-pipeline.yml file and run your deployment pipeline.

Example bitbucket-pipelines.yml file
image: node:7.5.0

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
        image: aneitayang/aws-cli:1.0
        deployment: test
        script:
          - python deploy.py test
    - step:
        name: Deploy to staging
        image: aneitayang/aws-cli:1.0
        deployment: staging
        trigger: manual
        script:
          - python deploy.py staging
    - step:
        name: Deploy to production
        image: aneitayang/aws-cli:1.0
        deployment: production
        trigger: manual
        script:
          - python deploy.py prod

Step 3: Track your deployments

Once your deployment step has run, you can track your deployments on the Deployment page.

Deployments dashboard

It's now easier to find the information you want about each environment including:

  • What's currently in each environment
  • A deployment history for each environment

The Deployments dashboard shows a summary of which version of software is running in each tracked environment, along with a complete history of earlier deployments.

Only deployments and environments with deployment tracking enabled in your bitbucket-pipelines.yml will be visible on the Deployments page.

Environment Summary

The environment summary on the Deployments dashboard shows the status of each tracked environment including:

  • The deployment number of the latest deployment to the environment
  • The commit message of the latest deployment
  • The time the latest deployment began
  • The status of the latest deployment

Deployment History

The deployment history shows a complete history of tracked deployments in the repository. You can filter the history list to see the deployments to a specific environment. 

 

Deployment Summary

The deployment summary is triggered by clicking on a deployment in the environment summary, or in the history list. The summary shows information about the deployment including:

  • The environment it was deployed to
  • The previous deployment in the environment
  • The status of the deployment
  • The triggerer of the deployment (if the deployment was a manual step)
  • The date the deployment occurred
  • A ful list of commits in the deployments
  • A file diff between the new deployment and the previous deployment in the environment

 

Last modified on Dec 4, 2017

Was this helpful?

Yes
No
Provide feedback about this article

Not finding the help you need?

Ask the community

Powered by Confluence and Scroll Viewport.