Skip to content

Commit

Permalink
Merge pull request #268 from Hi-Fi/link_to_execution
Browse files Browse the repository at this point in the history
fix: link to actual pipeline execution
  • Loading branch information
markusl authored Apr 5, 2022
2 parents 6bead52 + 016062a commit 1ac1e7a
Show file tree
Hide file tree
Showing 8 changed files with 2,202 additions and 1,526 deletions.
25 changes: 16 additions & 9 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const project = new awscdk.AwsCdkConstructLibrary({
authorEmail: '[email protected]',
stability: 'stable',
repository: 'https://github.com/markusl/cdk-codepipeline-bitbucket-build-result-reporter.git',
cdkVersion: '2.13.0',
cdkVersion: '2.19.0',
constructsVersion: '10.0.105',
defaultReleaseBranch: 'master',
minNodeVersion: '14.17.0',
tsconfig: {
Expand All @@ -25,14 +26,15 @@ const project = new awscdk.AwsCdkConstructLibrary({
'@types/node-fetch',
'aws-sdk-client-mock',
'esbuild',
'constructs',
'@aws-sdk/types',
],
bundledDeps: [
'@aws-sdk/[email protected]',
'@aws-sdk/[email protected]',
'@aws-sdk/[email protected]',
'@aws-sdk/[email protected]',
'@aws-sdk/[email protected]',
'@aws-sdk/client-iam',
'@aws-sdk/client-ssm',
'@aws-sdk/client-s3',
'@aws-sdk/client-codebuild',
'@aws-sdk/client-codepipeline',
'@aws-sdk/signature-v4-crt',
'aws-lambda',
'node-fetch',
],
Expand Down
38 changes: 21 additions & 17 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.CodePipelineStatusHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const buildBitbucketBuildStatusBody = async (
state,
key: `${detail.stage}-${detail.action}`,
name: `CodePipeline ${detail.pipeline} ${detail.stage}/${detail.action} (${await getCurrentAccountAlias(event.account)} @ ${event.region})`,
url: `https://${event.region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${detail.pipeline}/view`,
url: `https://${event.region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${detail.pipeline}/executions/${detail['execution-id']}/visualization`,
description: `${detail.stage}-${detail.action}`,
};
};
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/index.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions test/index.CodePipelineStatusHandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('buildBitbucketBuildStatus InProgress', async () => {
key: 'Prod-myAction',
name: 'CodePipeline myPipeline Prod/myAction (Pipeline_Account @ us-east-1)',
state: 'INPROGRESS',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/view',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/executions/execution_Id/visualization',
});
});

Expand All @@ -48,7 +48,7 @@ test('buildBitbucketBuildStatus Succeeded', async () => {
key: 'Prod-myAction',
name: 'CodePipeline myPipeline Prod/myAction (Pipeline_Account @ us-east-1)',
state: 'SUCCESSFUL',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/view',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/executions/execution_Id/visualization',
});
});

Expand All @@ -58,7 +58,7 @@ test('buildBitbucketBuildStatus Superseded', async () => {
key: 'Prod-myAction',
name: 'CodePipeline myPipeline Prod/myAction (Pipeline_Account @ us-east-1)',
state: 'SUCCESSFUL',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/view',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/executions/execution_Id/visualization',
});
});

Expand All @@ -73,7 +73,7 @@ test('buildBitbucketBuildStatus FAILED Manual Approval is reported as success',
key: 'Prod-myAction',
name: 'CodePipeline myPipeline Prod/myAction (Pipeline_Account @ us-east-1)',
state: 'SUCCESSFUL',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/view',
url: 'https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/myPipeline/executions/execution_Id/visualization',
});
});

Expand Down
Loading

0 comments on commit 1ac1e7a

Please sign in to comment.