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:
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 have not enabled Pipelines, you will be prompted to configure a
bitbucket-pipelines.yml file after selecting a language template.
Step 2: Configure your deployment steps
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
Commit the update to your
bitbucket-pipeline.yml file and run your deployment pipeline.
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 Deployments page.
It's now easier to find the information you want about each environment including:
- Which environments have deployments in progress
- 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.
The environment summary on the Deployments dashboard shows the status of each tracked environment.
- Environment name
- Promotion button displaying the number of commits to be deployed to the next environment
- Date of this deployment
- Person who initiated the deployment (if it was a manual deployment)
- Build number
- Commit hash and message
- Status of deployment
Deployment Review and Promotion
We display the promotion button when the current artifact in an environment can be manually deployed to the next environment.
The number on the promotion button represents the number of commits that will be released as part of the deployment. Clicking on the promotion button launches the deployment review screen which allows you to review the changes that will be deployed.
Note: you can only have one in-progress deployment in each environment.
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.
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