Bitbucket でデプロイメント情報を確認
See where your code is deployed on pull requests and commits in Bitbucket Data Center without having to go over to your deployment tool.
On this page:
関連ページ
For Bamboo 8.1 and higher, deployment projects will automatically send deployment information to Bitbucket Data Center. For more details on integrating Bitbucket and Bamboo, see our Bamboo integration documentation.
For Jenkins 2.319.3+ and higher, use the following implementations:
For Freestyle jobs, this is implemented as a post-build action. The action will post an in-progress notification of the deployment during the Bitbucket SCM checkout, and a final notification during the post-build stage.
To create a post-deployment notifier to send deployment information to Bitbucket:
Select Add post-build action > Notify Bitbucket Server of deployment.
In the Post-build actions dialog, input the following:
Environment name (required) - the name of the environment being deployed to.
Environment type (optional) - the type of environment that was deployed to, for example, Production, Staging, etc. Choose none if a type does not apply.
Environment URL (optional)- if the environment has a URL, provide that here. Otherwise, leave blank.
Environment Key (optional) - unique identifier for the environment in Bitbucket. Leave it blank to have it automatically generated by the plugin.
For Pipeline and Multibranch Pipeline jobs, this is implemented as a wrapper step. The
bbs_deploy
step will post an in-progress notification to Bitbucket Data Center at the start of the block, and a final status at the end of the block based on whether the steps within the block were successful or not.
To set up notifying Bitbucket of the deployment status for Pipeline and Multibranch Pipeline jobs:
From the Pipeline Syntax page, select Sample step > bbs_deploy.
Provide an Environment name (required).
Optionally, select an Environment Type, input an Environment URL, and Key.
Select Generate Pipeline Script.
Copy the generated code block, for example:
bbs_deploy(environmentKey: 'MY-ENV', environmentName: 'My Production Environment', environmentType: 'PRODUCTION', environmentUrl: 'http://url.to.prod') {
// some block
}
6. Edit the Jenkins file and add the copied code to within the steps
block of the file. Your steps to do the deployment must be within the bbs_deploy
step.
7. Save or commit your changes.
For more details, see the documentation for the Bitbucket Server integration plugin for Jenkins.
If you’re using other integration tools, this can be done via the deployment status API.