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
You can modify your
bitbucket-pipeline.yml file to add
deployment: test to the step that performs the deployment to your test environment, and similar for your other deployment environments.
Currently Bitbucket Deployments supports deploying to
production environments and they must be listed in this order in the yml file.
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.
The Deployments dashboard shows a summary of the status of the environment, which version of software is running in each environment, and 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.
Deployment review and promotion
If the artifact in one environment can be manually promoted to the next environment, you will see a "Promote" button on the Deployments dashboard. Clicking on the promotion button launches the deployment preview screen which allows you to review the commits and the file changes that will be deployed.
Note: you can only have one in-progress deployment in each environment. Any later pipelines that deploy to the same environment will be automatically paused. You can manually resume the paused deployment step once the in-progress deployment completes.
By clicking on the history icon,, you can see a history of all earlier deployments to an environment. Clicking on any deployment on the dashboard will load a summary showing the changes that were deployed, along with information about when it was deployed and by whom.
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
- Who triggered the deployment (if the deployment was a manual step)
- The date the deployment occurred
- A full list of commits in the deployments
- A file diff between the new deployment and the previous deployment in the environment
See your Jira issues in Deployments
If you use Jira to keep track of work, you can link your Jira so that issues that are related to a deployment show up on the deployment summary and deployment preview screens. Just add the issue key, or keys, to your commit message and we'll add links to them in the issues tab.
git commit -m "PT-323 Add created workers to container cluster"