A collection of AWS CDK constructs for DevOps automation, providing features like versioning and deployment metadata capabilities for your CDK applications.
npm install cdk-devopsCompute and track version information for your CDK deployments. Supports multiple versioning strategies including git tags, package.json versions, commit counts, and custom formats.
import{VersioningStrategy,VersionInfo,VersionOutputs}from'cdk-devops';// Use a pre-built strategyconststrategy=VersioningStrategy.gitTag();// Create version info from environmentconstversionInfo=VersionInfo.fromEnvironment('1.0.0','production');// Output version to CloudFormation and SSM Parameter StorenewVersionOutputs(stack,'VersionOutputs',{
versionInfo,cloudFormation: {enabled: true},parameterStore: {enabled: true,basePath: '/myapp/version'},});For detailed documentation, see Versioning Guide.
Add repository and CI/CD pipeline metadata to your CloudFormation stacks, making it easy to track deployments back to their source code and build pipelines.
import{StackMetadata}from'cdk-devops';// Automatically extracts repo and pipeline info from CI/CD environmentnewStackMetadata(stack,'Metadata');Works out of the box with GitHub Actions, GitLab CI, AWS CodeBuild, and generic CI/CD systems.
For detailed documentation, see Metadata Guide.
A CLI utility for computing versions based on git information:
npx compute-version --strategy git-tag --environment productionFor complete API documentation, see API.md.
Apache-2.0