A JSII construct lib for reporting AWS CodePipeline and build statuses to a Bitbucket server instance
npm install cdk-codepipeline-bitbucket-build-result-reporter
!Release
Automatically report all CodePipeline build results to a Bitbucket server. For details, see the Bitbucket REST API documentation
Add the library to your AWS CDK project:
``sh`
npm i --save cdk-codepipeline-bitbucket-build-result-reporter
Configure the Bitbucket token that is used to synchronize statuses:
aws ssm put-parameter --name "/my/ssm/variable/BITBUCKET_UPDATE_BUILD_STATUS_TOKEN" --value "
Note: stack must be a CDK deployment stage so that the bundled Lambda asset will be properly deployed.
`ts
// AWS CDK 2.0
import { App, Stack, aws_ssm as ssm, aws_ec2 as ec2 } from 'aws-cdk-lib';
const bitbucketAccessTokenName = '/my/ssm/variable/BITBUCKET_UPDATE_BUILD_STATUS_TOKEN';
// In your infrastructure account, add to your stack
new CodePipelineBitbucketBuildResultReporter(stack, 'CodePipelineBitbucketBuildResultReporter', {
bitbucketServerAddress: 'bitbucket-server.com',
bitbucketAccessTokenName,
vpc: fakeVpc,
});
``