New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-cdk-build-badge

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-cdk-build-badge

aws-cdk-build-badge

  • 1.97.21
  • Source
  • PyPI
  • Socket score

Maintainers
1

NPM version PyPI version .NET version Release

tested cdk versions

aws-cdk-build-badge

This an AWS CDK custom construct for get the status of a CodeBuild Project with has CodePipeline as source. That is currently not possible:

How the native badges are working you find in the AWS docs:

After you created the build badge construct you can use the api gateway url to get the badge picture. Additionally you can retrieve the url to to the CodeBuild build with adding ?url=true to the query parameter. See the example.

URL to Build

If you want your badge forwarding you to your build when you click on it use the url=true parameter:

Build succeeded: [![CodeBuild test build](https://fktijpwdng.execute-api.eu-central-1.amazonaws.com/prod/?projectName=PipelineCustomStageprodTest-Fdei5bm2ulR6)](https://fktijpwdng.execute-api.eu-central-1.amazonaws.com/prod/?projectName=PipelineCustomStageprodTest-Fdei5bm2ulR6&url=true)

Default project name

You can use the defaultProjectName in the cdk construct to point the badge to a specific project. That way you don't need to write the projectName parameter in thr url.

new BuildBadge(stack, 'BuildBadge2', { defaultProjectName: 'Build123' });

Example

Build succeeded: CodeBuild test build

Build failed: CodeBuild test build

Build not found: CodeBuild test build

Build in progress: CodeBuild test build

Build stopped: CodeBuild test build

There are more badges (see ./badges/) but I don't have build in that state atm.

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
app = cdk.App()

stack = cdk.Stack(app, "my-build-badge-demo-stack")

# without exposing the account id in the url when using ?url=true
BuildBadge(stack, "BuildBadge")

# with exposing the account id in the url when using ?url=true
BuildBadge(stack, "BuildBadge2", hide_account_iD="no")

# partly exposing the account id in the url when using ?url=true
BuildBadge(stack, "BuildBadge3", hide_account_iD="XX123356")

Thanks To

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc