projen-pipelines 0.3.17 → 0.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.jsii +148 -92
  2. package/API.md +164 -0
  3. package/README.md +65 -0
  4. package/lib/assign-approver/base.js +1 -1
  5. package/lib/assign-approver/github.js +1 -1
  6. package/lib/awscdk/base.d.ts +34 -0
  7. package/lib/awscdk/base.js +35 -2
  8. package/lib/awscdk/bash.js +28 -2
  9. package/lib/awscdk/github.d.ts +12 -0
  10. package/lib/awscdk/github.js +53 -14
  11. package/lib/awscdk/gitlab.d.ts +4 -0
  12. package/lib/awscdk/gitlab.js +20 -9
  13. package/lib/drift/base.js +1 -1
  14. package/lib/drift/bash.js +1 -1
  15. package/lib/drift/github.js +1 -1
  16. package/lib/drift/gitlab.js +1 -1
  17. package/lib/drift/step.js +1 -1
  18. package/lib/steps/amplify-deploy.step.js +1 -1
  19. package/lib/steps/artifact-steps.js +2 -2
  20. package/lib/steps/aws-assume-role.step.js +1 -1
  21. package/lib/steps/github-summary.step.js +1 -1
  22. package/lib/steps/package-manager-setup.step.js +2 -2
  23. package/lib/steps/registries.js +3 -3
  24. package/lib/steps/step.js +4 -4
  25. package/lib/versioning/computation.js +3 -3
  26. package/lib/versioning/config.js +2 -2
  27. package/lib/versioning/outputs.js +5 -5
  28. package/lib/versioning/setup.js +1 -1
  29. package/lib/versioning/strategy.js +1 -1
  30. package/lib/versioning/version-info.js +2 -2
  31. package/llm.md +64 -0
  32. package/node_modules/@nodable/entities/README.md +23 -417
  33. package/node_modules/@nodable/entities/package.json +8 -3
  34. package/node_modules/@nodable/entities/src/EntityDecoder.js +543 -0
  35. package/node_modules/@nodable/entities/src/EntityEncoder.js +194 -0
  36. package/node_modules/@nodable/entities/src/entities.js +1177 -0
  37. package/node_modules/@nodable/entities/src/entityTries.js +49 -0
  38. package/node_modules/@nodable/entities/src/index.d.ts +176 -218
  39. package/node_modules/@nodable/entities/src/index.js +20 -17
  40. package/node_modules/commit-and-tag-version/.github/workflows/ci.yaml +2 -2
  41. package/node_modules/commit-and-tag-version/.github/workflows/release-please.yml +6 -4
  42. package/node_modules/commit-and-tag-version/CHANGELOG.md +14 -0
  43. package/node_modules/commit-and-tag-version/lib/updaters/types/maven.js +15 -2
  44. package/node_modules/commit-and-tag-version/package.json +8 -3
  45. package/node_modules/commit-and-tag-version/test/core.spec.js +34 -0
  46. package/node_modules/commit-and-tag-version/test/mocks/pom-6.3.1-attrs-lf.xml +27 -0
  47. package/node_modules/commit-and-tag-version/test/mocks/pom-6.4.0-attrs-lf.xml +28 -0
  48. package/node_modules/fast-xml-builder/CHANGELOG.md +24 -0
  49. package/node_modules/fast-xml-builder/README.md +53 -2
  50. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
  51. package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
  52. package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
  53. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
  54. package/node_modules/fast-xml-builder/package.json +3 -2
  55. package/node_modules/fast-xml-builder/src/fxb.d.ts +93 -3
  56. package/node_modules/fast-xml-builder/src/fxb.js +108 -38
  57. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +97 -30
  58. package/node_modules/fast-xml-builder/src/util.js +16 -0
  59. package/node_modules/fast-xml-parser/CHANGELOG.md +41 -0
  60. package/node_modules/fast-xml-parser/README.md +2 -7
  61. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
  62. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
  63. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  64. package/node_modules/fast-xml-parser/lib/fxp.d.cts +18 -1
  65. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  66. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  67. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  68. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  69. package/node_modules/fast-xml-parser/package.json +6 -6
  70. package/node_modules/fast-xml-parser/src/fxp.d.ts +29 -1
  71. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +16 -15
  72. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +11 -7
  73. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +48 -31
  74. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +2 -2
  75. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +4 -0
  76. package/node_modules/hasown/CHANGELOG.md +11 -0
  77. package/node_modules/hasown/eslint.config.mjs +6 -0
  78. package/node_modules/hasown/index.d.ts +1 -0
  79. package/node_modules/hasown/package.json +14 -14
  80. package/node_modules/is-core-module/CHANGELOG.md +244 -113
  81. package/node_modules/is-core-module/README.md +1 -1
  82. package/node_modules/is-core-module/core.json +12 -12
  83. package/node_modules/is-core-module/package.json +5 -5
  84. package/node_modules/is-core-module/test/index.js +101 -0
  85. package/node_modules/semver/README.md +19 -4
  86. package/node_modules/semver/bin/semver.js +14 -10
  87. package/node_modules/semver/functions/truncate.js +48 -0
  88. package/node_modules/semver/index.js +2 -0
  89. package/node_modules/semver/internal/re.js +1 -1
  90. package/node_modules/semver/package.json +3 -3
  91. package/node_modules/semver/range.bnf +5 -4
  92. package/node_modules/strnum/CHANGELOG.md +3 -0
  93. package/node_modules/strnum/package.json +3 -2
  94. package/node_modules/strnum/strnum.js +12 -10
  95. package/node_modules/xml-naming/README.md +189 -0
  96. package/node_modules/xml-naming/package.json +54 -0
  97. package/node_modules/xml-naming/src/index.d.ts +74 -0
  98. package/node_modules/xml-naming/src/index.js +270 -0
  99. package/node_modules/yaml/browser/dist/compose/composer.js +4 -2
  100. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
  101. package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
  102. package/node_modules/yaml/browser/dist/parse/lexer.js +28 -24
  103. package/node_modules/yaml/browser/dist/parse/parser.js +12 -4
  104. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
  105. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
  106. package/node_modules/yaml/dist/compose/composer.js +4 -2
  107. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
  108. package/node_modules/yaml/dist/nodes/Alias.js +2 -0
  109. package/node_modules/yaml/dist/nodes/Scalar.d.ts +5 -1
  110. package/node_modules/yaml/dist/parse/lexer.js +28 -24
  111. package/node_modules/yaml/dist/parse/parser.js +12 -4
  112. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
  113. package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
  114. package/node_modules/yaml/package.json +1 -1
  115. package/package.json +8 -8
  116. package/node_modules/@nodable/entities/src/EntityReplacer.js +0 -385
  117. package/node_modules/@nodable/entities/src/groups.js +0 -110
  118. package/node_modules/fast-xml-parser/src/fast-xml-parser.zip +0 -0
  119. package/node_modules/hasown/.eslintrc +0 -5
package/.jsii CHANGED
@@ -12,11 +12,11 @@
12
12
  "pipelines-release": "lib/release.js"
13
13
  },
14
14
  "bundled": {
15
- "commit-and-tag-version": "^12.7.1"
15
+ "commit-and-tag-version": "^12.7.3"
16
16
  },
17
17
  "dependencies": {
18
18
  "constructs": "^10.5.1",
19
- "projen": ">=0.99.49 <1.0.0"
19
+ "projen": ">=0.99.57 <1.0.0"
20
20
  },
21
21
  "dependencyClosure": {
22
22
  "constructs": {
@@ -91,7 +91,7 @@
91
91
  "stability": "stable"
92
92
  },
93
93
  "homepage": "https://github.com/open-constructs/projen-pipelines.git",
94
- "jsiiVersion": "5.9.37 (build 5176c0d)",
94
+ "jsiiVersion": "5.9.40 (build 8be98bb)",
95
95
  "keywords": [
96
96
  "aws",
97
97
  "cdk",
@@ -108,7 +108,7 @@
108
108
  },
109
109
  "name": "projen-pipelines",
110
110
  "readme": {
111
- "markdown": "# Projen Pipelines\n\n[![npm version](https://badge.fury.io/js/projen-pipelines.svg)](https://www.npmjs.com/package/projen-pipelines)\n\nProjen Pipelines is an open-source project that automates the generation of CI/CD pipelines using Projen,\na project configuration tool created by the inventor of AWS CDK.\nIt provides high-level abstractions for defining continuous delivery (CD) pipelines for applications,\nspecifically designed to work with the projen project configuration engine.\n\n### Key Features\n\n* Automates code generation for CI/CD pipelines\n* Supports multiple CI/CD platforms (currently GitHub Actions and GitLab CI, with more in development)\n* Provides baked-in proven defaults for pipeline configurations\n* Enables compliance-as-code integration\n* Allows easy switching between different CI/CD platforms without rewriting pipeline configurations\n* Handles complex deployment scenarios with less code\n* Manages AWS infrastructure more efficiently and straightforwardly\n* Automated drift detection for CloudFormation/CDK stacks with scheduled checks and issue creation\n* Automatic versioning with flexible strategies and multiple output targets\n\n### Benefits\n\n* Reduces repetitive work in writing and maintaining pipeline configurations\n* Ensures consistency across projects by using proven defaults\n* Simplifies compliance management by integrating it directly into pipeline definitions\n* Facilitates platform migrations (e.g., from GitHub to GitLab) by abstracting pipeline definitions\n* Provides automatic version tracking and exposure through CloudFormation and SSM Parameter Store\n\n## Beyond AWS CDK: A Vision for Universal CI/CD Pipeline Generation\n\nWhile Projen Pipelines currently focuses on AWS CDK applications, our vision extends far beyond this initial scope.\nWe aim to evolve into a universal CI/CD pipeline generator capable of supporting a wide variety of application types and deployment targets.\n\n### Future Direction:\n\n1. Diverse Application Support: We plan to expand our capabilities to generate pipelines for various application types, including but not limited to:\n * Traditional web applications\n * Terraform / OpenTOFU projects\n * Winglang applications\n * Static websites and single-page applications\n1. Multi-Cloud Deployment: While we started with AWS, we aim to support deployments to other major cloud providers like Azure, Google Cloud Platform, and others.\n1. On-Premises and Hybrid Scenarios: We recognize the importance of on-premises and hybrid cloud setups and plan to cater to these deployment models.\n1. Framework Agnostic: Our goal is to make Projen Pipelines adaptable to work with various development frameworks and tools, not just those related to AWS or cloud deployments.\n1. Extensibility: We're designing the system to be easily extensible, allowing the community to contribute modules for new application types, deployment targets, or CI/CD platforms.\n\nBy broadening our scope, we aim to create a tool that can standardize and simplify CI/CD pipeline creation across the entire spectrum of modern application development and deployment scenarios.\nWe invite the community to join us in this journey, contributing ideas, use cases, and code to help realize this vision.\n\n## How Projen Pipelines work\n![High level Projen Pipelines Overview](documentation/overview.png)\n\nUnder the hood, after you define the pipeline and select the target engine you want to work on, we use code generation methods to create the required CI/CD pipeline in your project.\n\nWe are considering allowing the selection of multiple engines going forward - please let us know if this is a feature you would use!\n\n## Getting Started\n\n### Installation\n\nTo install the package, add the package `projen-pipelines` to your projects devDeps in your projen configuration file.\n\nAfter installing the package, you can import and use the constructs to define your CDK Pipelines.\n\nYou will also have to setup an IAM role that can be used by GitHub Actions. For example, create a role named `GithubDeploymentRole` in your deployment account (`123456789012`) with a policy like this to assume the CDK roles of the pipeline stages (AWS account IDs `123456789013` and `123456789014`):\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"Statement1\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Resource\": [\n \"arn:aws:iam::123456789013:role/cdk-*-123456789013-*\",\n \"arn:aws:iam::123456789014:role/cdk-*-123456789014-*\"\n ]\n }\n ]\n}\n```\n\nAdd a trust policy to this role as described in this tutorial: [Configuring OpenID Connect in Amazon Web Services](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)\n\n### Usage with AWS CDK\n\nYou can start using the constructs provided by Projen Pipelines in your AWS CDK applications. Here's a brief example:\n\n```typescript\nimport { awscdk } from 'projen';\nimport { GithubCDKPipeline } from 'projen-pipelines';\n\n// Define your AWS CDK TypeScript App\nconst app = new awscdk.AwsCdkTypeScriptApp({\n cdkVersion: '2.150.0',\n name: 'my-awesome-app',\n defaultReleaseBranch: 'main',\n devDeps: [\n 'projen-pipelines',\n ],\n});\n\n// Create the pipeline\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n pkgNamespace: '@company-assemblies',\n useGithubPackagesForAssembly: true,\n stages: [\n {\n name: 'dev',\n env: { account: '123456789013', region: 'eu-central-1' },\n }, {\n name: 'prod',\n manualApproval: true,\n env: { account: '123456789014', region: 'eu-central-1' },\n }],\n});\n```\n\nAfter running projen (`npx projen`) a new file called `src/app.ts` will be created and contain a specialized CDK App class for your project.\n\nYou can then use this in your `main.ts` to configure your deployment.\n\n```typescript\nimport { PipelineApp } from './app';\nimport { BackendStack } from './stack';\n\nconst app = new PipelineApp({\n provideDevStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: 'api-dev',\n myConfigSetting: 'value-for-dev',\n });\n },\n provideProdStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: 'api',\n myConfigSetting: 'value-for-prod',\n });\n },\n providePersonalStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: `api-${props.stageName}`,\n myConfigSetting: 'value-for-personal-stage',\n });\n },\n});\n\napp.synth();\n```\n\n### Drift Detection\n\nProjen Pipelines includes built-in support for automated drift detection of your CloudFormation/CDK stacks. This feature helps you identify when your deployed infrastructure has diverged from your code definitions.\n\n```typescript\nimport { GitHubDriftDetectionWorkflow } from 'projen-pipelines';\n\nnew GitHubDriftDetectionWorkflow(app, {\n schedule: '0 0 * * *', // Daily at midnight\n createIssues: true, // Automatically create GitHub issues\n stages: [\n {\n name: 'production',\n region: 'us-east-1',\n roleArn: 'arn:aws:iam::123456789012:role/DriftDetectionRole',\n failOnDrift: true,\n },\n ],\n});\n```\n\nSee the [drift detection documentation](docs/drift-detection.md) for detailed configuration options and examples.\n\n### Setting Up Trust Relationships Between Accounts\n\nWhen planning to manage multiple staging environments, you will need to establish trust relationships. This process centralizes deployment control, improving operational efficiency and security by consolidating deployment management through a singular, monitored channel. Here is a simplified diagram for the setup:\n\n![Trust relationship](documentation/trust.svg)\n\n#### Step 1: Bootstrapping Each Account\n\nBootstrapping initializes the AWS CDK environment in each account. It prepares the account to work with AWS CDK apps deployed from other accounts. Use the `cdk bootstrap` command for this purpose. Replace `<deployment_account_id>` with the actual AWS account ID of your deployment account.\n\nYou can use the [CloudShell](https://aws.amazon.com/cloudshell/) to bootstrap each staging account:\n\n```bash\ncdk bootstrap --trust <deployment_account_id> --cloudformation-execution-policies \"arn:aws:iam::aws:policy/AdministratorAccess\"\n```\n\n**Note:**\n\nWhile `AdministratorAccess` grants full access to all AWS services and resources, it's not recommended for production environments due to security risks. Instead, create custom IAM policies that grant only the necessary permissions required for deployment operations.\n\n### Deployment\n\nThe `<Engine>CDKPipeline` class creates and adds several tasks to the projen project that then can be used in your pipeline to deploy your application to AWS.\n\nHere's a brief description of each one:\n\n1. **deploy:personal** - This task deploys the application's personal stage, which is a distinct, isolated deployment of the application. The personal stage is intended for personal use, such as testing and development.\n\n2. **watch:personal** - This task deploys the personal stage of the application in watch mode. In this mode, the AWS CDK monitors your application source files for changes, automatically re-synthesizing and deploying when it detects any changes.\n\n3. **diff:personal** - This task compares the deployed personal stage with the current state of the application code. It's used to understand what changes would be made if the application were deployed.\n\n4. **destroy:personal** - This task destroys the resources created for the personal stage of the application.\n\n5. **deploy:feature** - This task deploys the application's feature stage. The feature stage is used for new features testing before these are merged into the main branch.\n\n6. **diff:feature** - This task is similar to `diff:personal`, but for the feature stage.\n\n7. **destroy:feature** - This task destroys the resources created for the feature stage of the application.\n\n8. **deploy:<stageName>** - This task deploys a specific stage of the application (like 'dev' or 'prod').\n\n9. **diff:<stageName>** - This task compares the specified application stage with the current state of the application code.\n\n10. **publish:assets** - This task publishes the CDK assets to all accounts. This is useful when the CDK application uses assets like Docker images or files from the S3 bucket.\n\n11. **bump** - This task bumps the version based on the latest git tag and pushes the updated tag to the git repository.\n\n12. **release:push-assembly** - This task creates a manifest, bumps the version without creating a git tag, and publishes the cloud assembly to your registry.\n\nRemember that these tasks are created and managed automatically by the `CDKPipeline` class. You can run these tasks using the `npx projen TASK_NAME` command.\n\n## Versioning\n\nProjen Pipelines includes a comprehensive versioning system that automatically tracks and exposes deployment versions through various AWS services. This feature enables deployment traceability, automated rollback decisions, and comprehensive audit trails.\n\n### Basic Versioning Configuration\n\nTo enable versioning in your pipeline, add the `versioning` configuration:\n\n```typescript\nimport { awscdk } from 'projen';\nimport { GithubCDKPipeline, VersioningStrategy, VersioningOutputs } from 'projen-pipelines';\n\nconst app = new awscdk.AwsCdkTypeScriptApp({\n // ... other config\n});\n\nnew GithubCDKPipeline(app, {\n // ... other pipeline config\n\n versioning: {\n enabled: true,\n strategy: VersioningStrategy.commitCount(),\n outputs: VersioningOutputs.standard()\n }\n});\n```\n\n### Versioning Strategies\n\nProjen Pipelines provides several built-in versioning strategies:\n\n#### Git Tag Strategy\nUses git tags as the version source, with optional prefix stripping:\n\n```typescript\n// Basic git tag strategy\nconst strategy = VersioningStrategy.gitTag();\n\n// With custom configuration\nconst strategy = VersioningStrategy.gitTag({\n stripPrefix: 'v', // Strip 'v' from tags (v1.2.3 → 1.2.3)\n annotatedOnly: true, // Only use annotated tags\n includeSinceTag: true // Include commits since tag\n});\n```\n\n#### Package.json Strategy\nUses the version from your package.json file:\n\n```typescript\n// Basic package.json strategy\nconst strategy = VersioningStrategy.packageJson();\n\n// With custom configuration\nconst strategy = VersioningStrategy.packageJson({\n path: './package.json',\n includePrerelease: true,\n appendCommitInfo: true\n});\n```\n\n#### Commit Count Strategy\nUses the number of commits as the version:\n\n```typescript\n// Basic commit count strategy\nconst strategy = VersioningStrategy.commitCount();\n\n// With custom configuration\nconst strategy = VersioningStrategy.commitCount({\n countFrom: 'all', // 'all' | 'since-tag'\n includeBranch: true, // Include branch name\n padding: 5 // Zero-pad count (00001)\n});\n```\n\n#### Build Number Strategy\nCreates a version from build metadata:\n\n```typescript\n// Basic build number strategy\nconst strategy = VersioningStrategy.buildNumber();\n\n// With custom configuration\nconst strategy = VersioningStrategy.buildNumber({\n prefix: 'release',\n commitCount: { countFrom: 'all', padding: 5 }\n});\n// Output: release-01234-3a4b5c6d\n```\n\n#### Custom Composite Strategy\nCreate your own version format using template variables:\n\n```typescript\nconst strategy = VersioningStrategy.create(\n '{git-tag}+{commit-count}-{commit-hash:8}',\n {\n gitTag: { stripPrefix: 'v' },\n commitCount: { countFrom: 'since-tag' }\n }\n);\n// Output: 1.2.3+45-3a4b5c6d\n```\n\n### Version Output Configurations\n\nControl how and where version information is exposed:\n\n#### CloudFormation Outputs\nExport version information as CloudFormation stack outputs:\n\n```typescript\n// Basic CloudFormation output\nconst outputs = VersioningOutputs.cloudFormationOnly();\n\n// With custom configuration\nconst outputs = VersioningOutputs.cloudFormationOnly({\n exportName: 'MyApp-{stage}-Version'\n});\n```\n\n#### SSM Parameter Store\nStore version information in AWS Systems Manager Parameter Store:\n\n```typescript\n// Basic parameter store\nconst outputs = VersioningOutputs.parameterStoreOnly('/myapp/{stage}/version');\n\n// Hierarchical parameters\nconst outputs = VersioningOutputs.hierarchicalParameters('/myapp/{stage}/version', {\n includeCloudFormation: true\n});\n```\n\nThis creates parameters like:\n- `/myapp/prod/version` → Full version JSON\n- `/myapp/prod/version/commit` → Commit hash\n- `/myapp/prod/version/tag` → Git tag\n- `/myapp/prod/version/count` → Commit count\n\n#### Standard Configuration\nThe recommended configuration that uses CloudFormation outputs with optional Parameter Store:\n\n```typescript\nconst outputs = VersioningOutputs.standard({\n parameterName: '/myapp/{stage}/version',\n});\n```\n\n### Output Formats\n\nVersion information can be output in two formats:\n\n**Plain Format:** Simple string values in CloudFormation\n```yaml\nOutputs:\n AppVersion:\n Value: \"1.2.3+45-3a4b5c6d\"\n Description: \"Application version\"\n AppCommitHash:\n Value: \"3a4b5c6def1234567890\"\n Description: \"Git commit hash\"\n```\n\n**Structured Format:** JSON object with comprehensive metadata in SSM\n```json\n{\n \"version\": \"1.2.3\",\n \"commitHash\": \"3a4b5c6def1234567890\",\n \"commitCount\": 1234,\n \"commitsSinceTag\": 45,\n \"branch\": \"main\",\n \"tag\": \"v1.2.3\",\n \"deployedAt\": \"2024-01-15T10:30:00Z\",\n \"deployedBy\": \"github-actions\",\n \"buildNumber\": \"456\",\n \"environment\": \"production\"\n}\n```\n\n### Stage-Specific Overrides\n\nConfigure different versioning strategies for different stages:\n\n```typescript\nnew GithubCDKPipeline(app, {\n versioning: {\n enabled: true,\n strategy: VersioningStrategy.gitTag(),\n outputs: VersioningOutputs.standard(),\n stageOverrides: {\n dev: {\n strategy: VersioningStrategy.commitCount(),\n outputs: VersioningOutputs.minimal()\n },\n prod: {\n validation: {\n requireTag: true,\n tagPattern: /^v\\d+\\.\\d+\\.\\d+$/\n }\n }\n }\n }\n});\n```\n\n### Template Variables\n\nAll strategies support these template variables:\n- `{git-tag}` - Git tag (with optional prefix stripping)\n- `{package-version}` - Version from package.json\n- `{commit-count}` - Number of commits\n- `{commit-hash}` - Full commit hash\n- `{commit-hash:8}` - Short commit hash (8 characters)\n- `{branch}` - Git branch name\n- `{build-number}` - CI/CD build number\n\n### Benefits of Versioning\n\n1. **Deployment Traceability**: Always know exactly which code version is deployed\n2. **Automated Rollback**: Use version information for automated rollback decisions\n3. **Audit Trail**: Comprehensive deployment history with metadata\n4. **Multi-Stage Support**: Different versioning strategies per environment\n5. **Zero Configuration**: Works out-of-the-box with sensible defaults\n6. **CI/CD Integration**: Automatically detects version info from CI/CD environments\n\n### Feature Branch Deployments\n\nProjen Pipelines supports automated feature branch deployments for GitHub Actions. This allows you to deploy and test your changes in isolated environments before merging to the main branch. Gitlab support is currently missing.\n\n#### Configuration\n\nTo enable feature branch deployments, add the `featureStages` configuration to your pipeline:\n\n```typescript\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n featureStages: {\n env: { account: '123456789013', region: 'eu-central-1' },\n },\n stages: [\n // ... your regular stages\n ],\n});\n```\n\n#### How It Works\n\nWhen feature stages are configured, two GitHub workflows are created:\n\n1. **deploy-feature** - Automatically deploys your feature branch when a pull request is labeled with `feature-deployment`\n2. **destroy-feature** - Automatically destroys the feature deployment when:\n - The pull request is closed\n - The `feature-deployment` label is removed from the pull request\n\n#### Using Feature Deployments\n\n1. Create a pull request with your changes\n2. Add the `feature-deployment` label to trigger deployment\n3. The feature environment will be deployed with a stack name including your branch name\n4. Remove the label or close the PR to destroy the feature environment\n\nThe feature deployment uses the `--force` flag when destroying to ensure cleanup without manual confirmation.\n\n### Monorepo / Path Filtering\n\nIn monorepo setups, you may want to only trigger a pipeline when changes are made to specific paths. Use the `paths` option to configure path-based filtering:\n\n```typescript\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n paths: ['packages/my-app/**', 'shared-libs/**'],\n stages: [\n {\n name: 'dev',\n env: { account: '123456789013', region: 'eu-central-1' },\n },\n ],\n});\n```\n\nWhen `paths` is specified:\n- **GitHub Actions**: The deploy workflow will only trigger on pushes that include changes to the matching paths. Feature branch workflows (deploy/destroy) are also filtered. Manual dispatch (`workflow_dispatch`) remains unfiltered and can always be triggered.\n- **GitLab CI**: Deployment and diff jobs use `only.changes` to only run when matching files are modified.\n\nThis allows you to have multiple pipelines in the same repository, each responsible for a different subproject, without triggering unnecessary deployments.\n\n### AWS Amplify Deployment\n\nProjen Pipelines includes support for deploying static websites and single-page applications to AWS Amplify Hosting. This feature provides automated deployment of build artifacts to Amplify, with built-in support for multiple environments and branch-based deployments.\n\n#### Configuration\n\nTo add Amplify deployment to your pipeline, use the `AmplifyDeployStep`:\n\n```typescript\nimport { AmplifyDeployStep } from 'projen-pipelines';\n\n// Using a static Amplify app ID\nconst deployStep = new AmplifyDeployStep(project, {\n appId: 'd123gtgt770s1x',\n artifactFile: 'dist.zip',\n branchName: 'main', // optional, defaults to 'main'\n region: 'us-east-1', // optional, defaults to 'eu-central-1'\n});\n\n// Using dynamic app ID extraction from CDK outputs\nconst deployStep = new AmplifyDeployStep(project, {\n appIdCommand: 'jq -r \\'.MyStack.AmplifyAppId\\' cdk-outputs.json',\n artifactFile: 'build.zip',\n environment: 'production', // optional, for environment-specific deployments\n});\n```\n\n#### How It Works\n\nThe Amplify deployment step:\n1. Checks for any pending Amplify deployments and cancels them if needed\n2. Creates a new deployment with the Amplify service\n3. Uploads your build artifact (zip file) to Amplify\n4. Starts the deployment and monitors its progress\n5. Validates the deployment succeeded\n\n#### Build Artifact Preparation\n\nBefore using the Amplify deployment step, ensure your build process creates a zip file containing your static website assets:\n\n```bash\n# Example: Creating a deployment artifact\nnpm run build\ncd dist && zip -r ../dist.zip . && cd ..\n```\n\n#### Multi-Stage Deployments\n\nFor multi-stage deployments with different Amplify apps per environment:\n\n```typescript\n// In your CDK stack, output the Amplify app ID\nnew CfnOutput(this, 'AmplifyAppId', {\n key: 'AmplifyAppId',\n value: amplifyApp.appId,\n});\n\n// In your pipeline configuration\nconst deployStep = new AmplifyDeployStep(project, {\n appIdCommand: `jq -r '.${stackName}.AmplifyAppId' cdk-outputs-${stage}.json`,\n artifactFile: 'website.zip',\n environment: stage,\n branchName: stage === 'prod' ? 'main' : stage,\n});\n```\n\n## Current Status\n\nProjen-Pipelines is currently in version 0.x, awaiting Projen's 1.0 release. Despite its pre-1.0 status, it's being used in several production environments.\n\n## Contributing\n\n### By raising feature requests or issues\n\nUse the Github integrated \"[Issues](https://github.com/taimos/projen-pipelines/issues/new)\" view to create an item that you would love to have added to our open source project.\n\n***No request is too big or too small*** - get your thoughts created and we'll get back to you if we have questions!\n\n### By committing code\n\nWe welcome all contributions to Projen Pipelines! Here's how you can get started:\n\n1. **Fork the Repository**: Click the 'Fork' button at the top right of this page to duplicate this repository in your GitHub account.\n\n2. **Clone your Fork**: Clone the forked repository to your local machine.\n\n```bash\ngit clone https://github.com/<your_username>/projen-pipelines.git\n```\n\n3. **Create a Branch**: To keep your work organized, create a branch for your contribution.\n\n```bash\ngit checkout -b my-branch\n```\n\n4. **Make your Changes**: Make your changes, additions, or fixes to the codebase. Remember to follow the existing code style.\n\n5. **Test your Changes**: Before committing your changes, make sure to test them to ensure they work as expected and do not introduce bugs.\n\n6. **Commit your Changes**: Commit your changes with a descriptive commit message using conventional commit messages.\n\n```bash\ngit commit -m \"feat: Your descriptive commit message\"\n```\n\n7. **Push to your Fork**: Push your commits to the branch in your forked repository.\n\n```bash\ngit push -u origin my-branch\n```\n\n8. **Submit a Pull Request**: Once your changes are ready to be reviewed, create a pull request from your forked repository's branch into the `main` branch of this repository.\n\nYour pull request will be reviewed and hopefully merged quickly. Thanks for contributing!\n\n### How to test changes?\nThe best way currently is to test things locally or - if you have a working stall of all supported CI/CD tools - manually test the functionalities there in diferent projects.\n\n_For local testing:_\nUsing `yalc push` you can install the project locally to your local yalc package manager. You can also use `npm run local-push` instead of this.\n\nWith `yalc add projen-pipelines` you can then use it in a local project.\n\n\n## Future Plans\n\n* Move the project to the Open Construct Foundation for broader community involvement\n* Continue expanding support for different CI/CD platforms and project types\n\nJoin us in elevating CI/CD pipeline discussions from implementation details to fundamental building blocks, and help create a more efficient, standardized approach to pipeline development!\n\n## Known issues\n\n### Environment variable not recognized during `npx projen`\n\nWhen attempting to run `npx projen`, users may encounter an error related to environment variable substitution within configuration files. Specifically, the `${GITHUB_TOKEN}` placeholder fails to be replaced.\n\n#### Solution\n\nTo resolve this issue, prefix the `npx projen` command with the `GITHUB_TOKEN=` environment variable:\n\n```bash\nGITHUB_TOKEN= npx projen\n```\n"
111
+ "markdown": "# Projen Pipelines\n\n[![npm version](https://badge.fury.io/js/projen-pipelines.svg)](https://www.npmjs.com/package/projen-pipelines)\n\nProjen Pipelines is an open-source project that automates the generation of CI/CD pipelines using Projen,\na project configuration tool created by the inventor of AWS CDK.\nIt provides high-level abstractions for defining continuous delivery (CD) pipelines for applications,\nspecifically designed to work with the projen project configuration engine.\n\n### Key Features\n\n* Automates code generation for CI/CD pipelines\n* Supports multiple CI/CD platforms (currently GitHub Actions and GitLab CI, with more in development)\n* Provides baked-in proven defaults for pipeline configurations\n* Enables compliance-as-code integration\n* Allows easy switching between different CI/CD platforms without rewriting pipeline configurations\n* Handles complex deployment scenarios with less code\n* Manages AWS infrastructure more efficiently and straightforwardly\n* Automated drift detection for CloudFormation/CDK stacks with scheduled checks and issue creation\n* Automatic versioning with flexible strategies and multiple output targets\n\n### Benefits\n\n* Reduces repetitive work in writing and maintaining pipeline configurations\n* Ensures consistency across projects by using proven defaults\n* Simplifies compliance management by integrating it directly into pipeline definitions\n* Facilitates platform migrations (e.g., from GitHub to GitLab) by abstracting pipeline definitions\n* Provides automatic version tracking and exposure through CloudFormation and SSM Parameter Store\n\n## Beyond AWS CDK: A Vision for Universal CI/CD Pipeline Generation\n\nWhile Projen Pipelines currently focuses on AWS CDK applications, our vision extends far beyond this initial scope.\nWe aim to evolve into a universal CI/CD pipeline generator capable of supporting a wide variety of application types and deployment targets.\n\n### Future Direction:\n\n1. Diverse Application Support: We plan to expand our capabilities to generate pipelines for various application types, including but not limited to:\n * Traditional web applications\n * Terraform / OpenTOFU projects\n * Winglang applications\n * Static websites and single-page applications\n1. Multi-Cloud Deployment: While we started with AWS, we aim to support deployments to other major cloud providers like Azure, Google Cloud Platform, and others.\n1. On-Premises and Hybrid Scenarios: We recognize the importance of on-premises and hybrid cloud setups and plan to cater to these deployment models.\n1. Framework Agnostic: Our goal is to make Projen Pipelines adaptable to work with various development frameworks and tools, not just those related to AWS or cloud deployments.\n1. Extensibility: We're designing the system to be easily extensible, allowing the community to contribute modules for new application types, deployment targets, or CI/CD platforms.\n\nBy broadening our scope, we aim to create a tool that can standardize and simplify CI/CD pipeline creation across the entire spectrum of modern application development and deployment scenarios.\nWe invite the community to join us in this journey, contributing ideas, use cases, and code to help realize this vision.\n\n## How Projen Pipelines work\n![High level Projen Pipelines Overview](documentation/overview.png)\n\nUnder the hood, after you define the pipeline and select the target engine you want to work on, we use code generation methods to create the required CI/CD pipeline in your project.\n\nWe are considering allowing the selection of multiple engines going forward - please let us know if this is a feature you would use!\n\n## Getting Started\n\n### Installation\n\nTo install the package, add the package `projen-pipelines` to your projects devDeps in your projen configuration file.\n\nAfter installing the package, you can import and use the constructs to define your CDK Pipelines.\n\nYou will also have to setup an IAM role that can be used by GitHub Actions. For example, create a role named `GithubDeploymentRole` in your deployment account (`123456789012`) with a policy like this to assume the CDK roles of the pipeline stages (AWS account IDs `123456789013` and `123456789014`):\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"Statement1\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Resource\": [\n \"arn:aws:iam::123456789013:role/cdk-*-123456789013-*\",\n \"arn:aws:iam::123456789014:role/cdk-*-123456789014-*\"\n ]\n }\n ]\n}\n```\n\nAdd a trust policy to this role as described in this tutorial: [Configuring OpenID Connect in Amazon Web Services](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)\n\n### Usage with AWS CDK\n\nYou can start using the constructs provided by Projen Pipelines in your AWS CDK applications. Here's a brief example:\n\n```typescript\nimport { awscdk } from 'projen';\nimport { GithubCDKPipeline } from 'projen-pipelines';\n\n// Define your AWS CDK TypeScript App\nconst app = new awscdk.AwsCdkTypeScriptApp({\n cdkVersion: '2.150.0',\n name: 'my-awesome-app',\n defaultReleaseBranch: 'main',\n devDeps: [\n 'projen-pipelines',\n ],\n});\n\n// Create the pipeline\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n pkgNamespace: '@company-assemblies',\n useGithubPackagesForAssembly: true,\n stages: [\n {\n name: 'dev',\n env: { account: '123456789013', region: 'eu-central-1' },\n }, {\n name: 'prod',\n manualApproval: true,\n env: { account: '123456789014', region: 'eu-central-1' },\n }],\n});\n```\n\nAfter running projen (`npx projen`) a new file called `src/app.ts` will be created and contain a specialized CDK App class for your project.\n\nYou can then use this in your `main.ts` to configure your deployment.\n\n```typescript\nimport { PipelineApp } from './app';\nimport { BackendStack } from './stack';\n\nconst app = new PipelineApp({\n provideDevStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: 'api-dev',\n myConfigSetting: 'value-for-dev',\n });\n },\n provideProdStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: 'api',\n myConfigSetting: 'value-for-prod',\n });\n },\n providePersonalStack: (scope, id, props) => {\n return new BackendStack(scope, id, {\n ...props,\n apiHostname: `api-${props.stageName}`,\n myConfigSetting: 'value-for-personal-stage',\n });\n },\n});\n\napp.synth();\n```\n\n### Drift Detection\n\nProjen Pipelines includes built-in support for automated drift detection of your CloudFormation/CDK stacks. This feature helps you identify when your deployed infrastructure has diverged from your code definitions.\n\n```typescript\nimport { GitHubDriftDetectionWorkflow } from 'projen-pipelines';\n\nnew GitHubDriftDetectionWorkflow(app, {\n schedule: '0 0 * * *', // Daily at midnight\n createIssues: true, // Automatically create GitHub issues\n stages: [\n {\n name: 'production',\n region: 'us-east-1',\n roleArn: 'arn:aws:iam::123456789012:role/DriftDetectionRole',\n failOnDrift: true,\n },\n ],\n});\n```\n\nSee the [drift detection documentation](docs/drift-detection.md) for detailed configuration options and examples.\n\n### Setting Up Trust Relationships Between Accounts\n\nWhen planning to manage multiple staging environments, you will need to establish trust relationships. This process centralizes deployment control, improving operational efficiency and security by consolidating deployment management through a singular, monitored channel. Here is a simplified diagram for the setup:\n\n![Trust relationship](documentation/trust.svg)\n\n#### Step 1: Bootstrapping Each Account\n\nBootstrapping initializes the AWS CDK environment in each account. It prepares the account to work with AWS CDK apps deployed from other accounts. Use the `cdk bootstrap` command for this purpose. Replace `<deployment_account_id>` with the actual AWS account ID of your deployment account.\n\nYou can use the [CloudShell](https://aws.amazon.com/cloudshell/) to bootstrap each staging account:\n\n```bash\ncdk bootstrap --trust <deployment_account_id> --cloudformation-execution-policies \"arn:aws:iam::aws:policy/AdministratorAccess\"\n```\n\n**Note:**\n\nWhile `AdministratorAccess` grants full access to all AWS services and resources, it's not recommended for production environments due to security risks. Instead, create custom IAM policies that grant only the necessary permissions required for deployment operations.\n\n### Deployment\n\nThe `<Engine>CDKPipeline` class creates and adds several tasks to the projen project that then can be used in your pipeline to deploy your application to AWS.\n\nHere's a brief description of each one:\n\n1. **deploy:personal** - This task deploys the application's personal stage, which is a distinct, isolated deployment of the application. The personal stage is intended for personal use, such as testing and development.\n\n2. **watch:personal** - This task deploys the personal stage of the application in watch mode. In this mode, the AWS CDK monitors your application source files for changes, automatically re-synthesizing and deploying when it detects any changes.\n\n3. **diff:personal** - This task compares the deployed personal stage with the current state of the application code. It's used to understand what changes would be made if the application were deployed.\n\n4. **destroy:personal** - This task destroys the resources created for the personal stage of the application.\n\n5. **deploy:feature** - This task deploys the application's feature stage. The feature stage is used for new features testing before these are merged into the main branch.\n\n6. **diff:feature** - This task is similar to `diff:personal`, but for the feature stage.\n\n7. **destroy:feature** - This task destroys the resources created for the feature stage of the application.\n\n8. **deploy:<stageName>** - This task deploys a specific stage of the application (like 'dev' or 'prod').\n\n9. **diff:<stageName>** - This task compares the specified application stage with the current state of the application code.\n\n10. **publish:assets** - This task publishes the CDK assets to all accounts. This is useful when the CDK application uses assets like Docker images or files from the S3 bucket.\n\n11. **bump** - This task bumps the version based on the latest git tag and pushes the updated tag to the git repository.\n\n12. **release:push-assembly** - This task creates a manifest, bumps the version without creating a git tag, and publishes the cloud assembly to your registry.\n\nRemember that these tasks are created and managed automatically by the `CDKPipeline` class. You can run these tasks using the `npx projen TASK_NAME` command.\n\n## Versioning\n\nProjen Pipelines includes a comprehensive versioning system that automatically tracks and exposes deployment versions through various AWS services. This feature enables deployment traceability, automated rollback decisions, and comprehensive audit trails.\n\n### Basic Versioning Configuration\n\nTo enable versioning in your pipeline, add the `versioning` configuration:\n\n```typescript\nimport { awscdk } from 'projen';\nimport { GithubCDKPipeline, VersioningStrategy, VersioningOutputs } from 'projen-pipelines';\n\nconst app = new awscdk.AwsCdkTypeScriptApp({\n // ... other config\n});\n\nnew GithubCDKPipeline(app, {\n // ... other pipeline config\n\n versioning: {\n enabled: true,\n strategy: VersioningStrategy.commitCount(),\n outputs: VersioningOutputs.standard()\n }\n});\n```\n\n### Versioning Strategies\n\nProjen Pipelines provides several built-in versioning strategies:\n\n#### Git Tag Strategy\nUses git tags as the version source, with optional prefix stripping:\n\n```typescript\n// Basic git tag strategy\nconst strategy = VersioningStrategy.gitTag();\n\n// With custom configuration\nconst strategy = VersioningStrategy.gitTag({\n stripPrefix: 'v', // Strip 'v' from tags (v1.2.3 → 1.2.3)\n annotatedOnly: true, // Only use annotated tags\n includeSinceTag: true // Include commits since tag\n});\n```\n\n#### Package.json Strategy\nUses the version from your package.json file:\n\n```typescript\n// Basic package.json strategy\nconst strategy = VersioningStrategy.packageJson();\n\n// With custom configuration\nconst strategy = VersioningStrategy.packageJson({\n path: './package.json',\n includePrerelease: true,\n appendCommitInfo: true\n});\n```\n\n#### Commit Count Strategy\nUses the number of commits as the version:\n\n```typescript\n// Basic commit count strategy\nconst strategy = VersioningStrategy.commitCount();\n\n// With custom configuration\nconst strategy = VersioningStrategy.commitCount({\n countFrom: 'all', // 'all' | 'since-tag'\n includeBranch: true, // Include branch name\n padding: 5 // Zero-pad count (00001)\n});\n```\n\n#### Build Number Strategy\nCreates a version from build metadata:\n\n```typescript\n// Basic build number strategy\nconst strategy = VersioningStrategy.buildNumber();\n\n// With custom configuration\nconst strategy = VersioningStrategy.buildNumber({\n prefix: 'release',\n commitCount: { countFrom: 'all', padding: 5 }\n});\n// Output: release-01234-3a4b5c6d\n```\n\n#### Custom Composite Strategy\nCreate your own version format using template variables:\n\n```typescript\nconst strategy = VersioningStrategy.create(\n '{git-tag}+{commit-count}-{commit-hash:8}',\n {\n gitTag: { stripPrefix: 'v' },\n commitCount: { countFrom: 'since-tag' }\n }\n);\n// Output: 1.2.3+45-3a4b5c6d\n```\n\n### Version Output Configurations\n\nControl how and where version information is exposed:\n\n#### CloudFormation Outputs\nExport version information as CloudFormation stack outputs:\n\n```typescript\n// Basic CloudFormation output\nconst outputs = VersioningOutputs.cloudFormationOnly();\n\n// With custom configuration\nconst outputs = VersioningOutputs.cloudFormationOnly({\n exportName: 'MyApp-{stage}-Version'\n});\n```\n\n#### SSM Parameter Store\nStore version information in AWS Systems Manager Parameter Store:\n\n```typescript\n// Basic parameter store\nconst outputs = VersioningOutputs.parameterStoreOnly('/myapp/{stage}/version');\n\n// Hierarchical parameters\nconst outputs = VersioningOutputs.hierarchicalParameters('/myapp/{stage}/version', {\n includeCloudFormation: true\n});\n```\n\nThis creates parameters like:\n- `/myapp/prod/version` → Full version JSON\n- `/myapp/prod/version/commit` → Commit hash\n- `/myapp/prod/version/tag` → Git tag\n- `/myapp/prod/version/count` → Commit count\n\n#### Standard Configuration\nThe recommended configuration that uses CloudFormation outputs with optional Parameter Store:\n\n```typescript\nconst outputs = VersioningOutputs.standard({\n parameterName: '/myapp/{stage}/version',\n});\n```\n\n### Output Formats\n\nVersion information can be output in two formats:\n\n**Plain Format:** Simple string values in CloudFormation\n```yaml\nOutputs:\n AppVersion:\n Value: \"1.2.3+45-3a4b5c6d\"\n Description: \"Application version\"\n AppCommitHash:\n Value: \"3a4b5c6def1234567890\"\n Description: \"Git commit hash\"\n```\n\n**Structured Format:** JSON object with comprehensive metadata in SSM\n```json\n{\n \"version\": \"1.2.3\",\n \"commitHash\": \"3a4b5c6def1234567890\",\n \"commitCount\": 1234,\n \"commitsSinceTag\": 45,\n \"branch\": \"main\",\n \"tag\": \"v1.2.3\",\n \"deployedAt\": \"2024-01-15T10:30:00Z\",\n \"deployedBy\": \"github-actions\",\n \"buildNumber\": \"456\",\n \"environment\": \"production\"\n}\n```\n\n### Stage-Specific Overrides\n\nConfigure different versioning strategies for different stages:\n\n```typescript\nnew GithubCDKPipeline(app, {\n versioning: {\n enabled: true,\n strategy: VersioningStrategy.gitTag(),\n outputs: VersioningOutputs.standard(),\n stageOverrides: {\n dev: {\n strategy: VersioningStrategy.commitCount(),\n outputs: VersioningOutputs.minimal()\n },\n prod: {\n validation: {\n requireTag: true,\n tagPattern: /^v\\d+\\.\\d+\\.\\d+$/\n }\n }\n }\n }\n});\n```\n\n### Template Variables\n\nAll strategies support these template variables:\n- `{git-tag}` - Git tag (with optional prefix stripping)\n- `{package-version}` - Version from package.json\n- `{commit-count}` - Number of commits\n- `{commit-hash}` - Full commit hash\n- `{commit-hash:8}` - Short commit hash (8 characters)\n- `{branch}` - Git branch name\n- `{build-number}` - CI/CD build number\n\n### Benefits of Versioning\n\n1. **Deployment Traceability**: Always know exactly which code version is deployed\n2. **Automated Rollback**: Use version information for automated rollback decisions\n3. **Audit Trail**: Comprehensive deployment history with metadata\n4. **Multi-Stage Support**: Different versioning strategies per environment\n5. **Zero Configuration**: Works out-of-the-box with sensible defaults\n6. **CI/CD Integration**: Automatically detects version info from CI/CD environments\n\n### Feature Branch Deployments\n\nProjen Pipelines supports automated feature branch deployments for GitHub Actions. This allows you to deploy and test your changes in isolated environments before merging to the main branch. Gitlab support is currently missing.\n\n#### Configuration\n\nTo enable feature branch deployments, add the `featureStages` configuration to your pipeline:\n\n```typescript\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n featureStages: {\n env: { account: '123456789013', region: 'eu-central-1' },\n },\n stages: [\n // ... your regular stages\n ],\n});\n```\n\n#### How It Works\n\nWhen feature stages are configured, two GitHub workflows are created:\n\n1. **deploy-feature** - Automatically deploys your feature branch when a pull request is labeled with `feature-deployment`\n2. **destroy-feature** - Automatically destroys the feature deployment when:\n - The pull request is closed\n - The `feature-deployment` label is removed from the pull request\n\n#### Using Feature Deployments\n\n1. Create a pull request with your changes\n2. Add the `feature-deployment` label to trigger deployment\n3. The feature environment will be deployed with a stack name including your branch name\n4. Remove the label or close the PR to destroy the feature environment\n\nThe feature deployment uses the `--force` flag when destroying to ensure cleanup without manual confirmation.\n\n### Monorepo / Path Filtering\n\nIn monorepo setups, you may want to only trigger a pipeline when changes are made to specific paths. Use the `paths` option to configure path-based filtering:\n\n```typescript\nnew GithubCDKPipeline(app, {\n stackPrefix: 'MyApp',\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/GithubDeploymentRole',\n },\n paths: ['packages/my-app/**', 'shared-libs/**'],\n stages: [\n {\n name: 'dev',\n env: { account: '123456789013', region: 'eu-central-1' },\n },\n ],\n});\n```\n\nWhen `paths` is specified:\n- **GitHub Actions**: The deploy workflow will only trigger on pushes that include changes to the matching paths. Feature branch workflows (deploy/destroy) are also filtered. Manual dispatch (`workflow_dispatch`) remains unfiltered and can always be triggered.\n- **GitLab CI**: Deployment and diff jobs use `only.changes` to only run when matching files are modified.\n\nThis allows you to have multiple pipelines in the same repository, each responsible for a different subproject, without triggering unnecessary deployments.\n\n### Monorepo Subproject Pipelines\n\nFor monorepos using projen subprojects, you can attach a pipeline directly to a subproject. The library automatically detects that the project is a subproject and configures CI to run commands in the correct subdirectory.\n\n```typescript\nimport { awscdk } from 'projen';\nimport { GithubCDKPipeline } from 'projen-pipelines';\n\n// Root monorepo project\nconst root = new awscdk.AwsCdkTypeScriptApp({\n cdkVersion: '2.150.0',\n name: 'my-monorepo',\n defaultReleaseBranch: 'main',\n});\n\n// Subproject at packages/backend\nconst backend = new awscdk.AwsCdkTypeScriptApp({\n cdkVersion: '2.150.0',\n name: 'backend',\n defaultReleaseBranch: 'main',\n parent: root,\n outdir: 'packages/backend',\n devDeps: ['projen-pipelines'],\n});\n\n// Pipeline for the subproject - automatically sets working directory\nnew GithubCDKPipeline(backend, {\n iamRoleArns: {\n default: 'arn:aws:iam::123456789012:role/DeployRole',\n },\n // Optional: build workspace dependencies first\n preBuildCommand: 'pnpm -r --filter backend^... run build',\n stages: [\n { name: 'dev', env: { account: '123456789012', region: 'eu-central-1' } },\n { name: 'prod', env: { account: '123456789013', region: 'eu-central-1' } },\n ],\n});\n```\n\nWhen the pipeline is attached to a subproject:\n- **GitHub Actions**: Every job gets `defaults.run.working-directory: packages/backend`, and artifact paths are prefixed with `packages/backend/`. Workflows are placed in the root `.github/workflows/` directory (since GitHub only discovers workflows there).\n- **GitLab CI**: Job scripts are prefixed with `cd packages/backend`, and artifact paths are adjusted.\n- **Bash**: The pipeline.md instructions include `cd packages/backend` before each command block.\n\n#### preBuildCommand\n\nIn monorepos, workspace sibling packages may need to be built before the app can compile. Use `preBuildCommand` to inject a build step that runs from the repository root before the synth/build:\n\n| Package Manager | preBuildCommand |\n|-----------------|-----------------|\n| pnpm | `pnpm -r --filter <appname>^... run build` |\n| npm | `npm run build --workspaces --if-present` |\n| yarn | `yarn workspaces foreach -Rt run build` |\n\n#### workingDirectory\n\nThe working directory is automatically computed from the project hierarchy. You can also set it explicitly via the `workingDirectory` option if needed (for example, when the pipeline project is not a projen subproject):\n\n```typescript\nnew GithubCDKPipeline(app, {\n workingDirectory: 'packages/backend',\n // ...\n});\n```\n\n### AWS Amplify Deployment\n\nProjen Pipelines includes support for deploying static websites and single-page applications to AWS Amplify Hosting. This feature provides automated deployment of build artifacts to Amplify, with built-in support for multiple environments and branch-based deployments.\n\n#### Configuration\n\nTo add Amplify deployment to your pipeline, use the `AmplifyDeployStep`:\n\n```typescript\nimport { AmplifyDeployStep } from 'projen-pipelines';\n\n// Using a static Amplify app ID\nconst deployStep = new AmplifyDeployStep(project, {\n appId: 'd123gtgt770s1x',\n artifactFile: 'dist.zip',\n branchName: 'main', // optional, defaults to 'main'\n region: 'us-east-1', // optional, defaults to 'eu-central-1'\n});\n\n// Using dynamic app ID extraction from CDK outputs\nconst deployStep = new AmplifyDeployStep(project, {\n appIdCommand: 'jq -r \\'.MyStack.AmplifyAppId\\' cdk-outputs.json',\n artifactFile: 'build.zip',\n environment: 'production', // optional, for environment-specific deployments\n});\n```\n\n#### How It Works\n\nThe Amplify deployment step:\n1. Checks for any pending Amplify deployments and cancels them if needed\n2. Creates a new deployment with the Amplify service\n3. Uploads your build artifact (zip file) to Amplify\n4. Starts the deployment and monitors its progress\n5. Validates the deployment succeeded\n\n#### Build Artifact Preparation\n\nBefore using the Amplify deployment step, ensure your build process creates a zip file containing your static website assets:\n\n```bash\n# Example: Creating a deployment artifact\nnpm run build\ncd dist && zip -r ../dist.zip . && cd ..\n```\n\n#### Multi-Stage Deployments\n\nFor multi-stage deployments with different Amplify apps per environment:\n\n```typescript\n// In your CDK stack, output the Amplify app ID\nnew CfnOutput(this, 'AmplifyAppId', {\n key: 'AmplifyAppId',\n value: amplifyApp.appId,\n});\n\n// In your pipeline configuration\nconst deployStep = new AmplifyDeployStep(project, {\n appIdCommand: `jq -r '.${stackName}.AmplifyAppId' cdk-outputs-${stage}.json`,\n artifactFile: 'website.zip',\n environment: stage,\n branchName: stage === 'prod' ? 'main' : stage,\n});\n```\n\n## Current Status\n\nProjen-Pipelines is currently in version 0.x, awaiting Projen's 1.0 release. Despite its pre-1.0 status, it's being used in several production environments.\n\n## Contributing\n\n### By raising feature requests or issues\n\nUse the Github integrated \"[Issues](https://github.com/taimos/projen-pipelines/issues/new)\" view to create an item that you would love to have added to our open source project.\n\n***No request is too big or too small*** - get your thoughts created and we'll get back to you if we have questions!\n\n### By committing code\n\nWe welcome all contributions to Projen Pipelines! Here's how you can get started:\n\n1. **Fork the Repository**: Click the 'Fork' button at the top right of this page to duplicate this repository in your GitHub account.\n\n2. **Clone your Fork**: Clone the forked repository to your local machine.\n\n```bash\ngit clone https://github.com/<your_username>/projen-pipelines.git\n```\n\n3. **Create a Branch**: To keep your work organized, create a branch for your contribution.\n\n```bash\ngit checkout -b my-branch\n```\n\n4. **Make your Changes**: Make your changes, additions, or fixes to the codebase. Remember to follow the existing code style.\n\n5. **Test your Changes**: Before committing your changes, make sure to test them to ensure they work as expected and do not introduce bugs.\n\n6. **Commit your Changes**: Commit your changes with a descriptive commit message using conventional commit messages.\n\n```bash\ngit commit -m \"feat: Your descriptive commit message\"\n```\n\n7. **Push to your Fork**: Push your commits to the branch in your forked repository.\n\n```bash\ngit push -u origin my-branch\n```\n\n8. **Submit a Pull Request**: Once your changes are ready to be reviewed, create a pull request from your forked repository's branch into the `main` branch of this repository.\n\nYour pull request will be reviewed and hopefully merged quickly. Thanks for contributing!\n\n### How to test changes?\nThe best way currently is to test things locally or - if you have a working stall of all supported CI/CD tools - manually test the functionalities there in diferent projects.\n\n_For local testing:_\nUsing `yalc push` you can install the project locally to your local yalc package manager. You can also use `npm run local-push` instead of this.\n\nWith `yalc add projen-pipelines` you can then use it in a local project.\n\n\n## Future Plans\n\n* Move the project to the Open Construct Foundation for broader community involvement\n* Continue expanding support for different CI/CD platforms and project types\n\nJoin us in elevating CI/CD pipeline discussions from implementation details to fundamental building blocks, and help create a more efficient, standardized approach to pipeline development!\n\n## Known issues\n\n### Environment variable not recognized during `npx projen`\n\nWhen attempting to run `npx projen`, users may encounter an error related to environment variable substitution within configuration files. Specifically, the `${GITHUB_TOKEN}` placeholder fails to be replaced.\n\n#### Solution\n\nTo resolve this issue, prefix the `npx projen` command with the `GITHUB_TOKEN=` environment variable:\n\n```bash\nGITHUB_TOKEN= npx projen\n```\n"
112
112
  },
113
113
  "repository": {
114
114
  "type": "git",
@@ -730,7 +730,7 @@
730
730
  },
731
731
  "locationInModule": {
732
732
  "filename": "src/awscdk/bash.ts",
733
- "line": 78
733
+ "line": 106
734
734
  },
735
735
  "name": "engineType",
736
736
  "overrides": "projen-pipelines.CDKPipeline",
@@ -942,7 +942,7 @@
942
942
  },
943
943
  "locationInModule": {
944
944
  "filename": "src/awscdk/base.ts",
945
- "line": 230
945
+ "line": 262
946
946
  },
947
947
  "parameters": [
948
948
  {
@@ -962,7 +962,7 @@
962
962
  "kind": "class",
963
963
  "locationInModule": {
964
964
  "filename": "src/awscdk/base.ts",
965
- "line": 223
965
+ "line": 249
966
966
  },
967
967
  "methods": [
968
968
  {
@@ -972,7 +972,7 @@
972
972
  },
973
973
  "locationInModule": {
974
974
  "filename": "src/awscdk/base.ts",
975
- "line": 438
975
+ "line": 504
976
976
  },
977
977
  "name": "createApplicationEntrypoint",
978
978
  "protected": true
@@ -984,7 +984,7 @@
984
984
  },
985
985
  "locationInModule": {
986
986
  "filename": "src/awscdk/base.ts",
987
- "line": 644
987
+ "line": 710
988
988
  },
989
989
  "name": "createFeatureStage",
990
990
  "protected": true
@@ -996,7 +996,7 @@
996
996
  },
997
997
  "locationInModule": {
998
998
  "filename": "src/awscdk/base.ts",
999
- "line": 693
999
+ "line": 759
1000
1000
  },
1001
1001
  "name": "createIndependentStage",
1002
1002
  "parameters": [
@@ -1019,7 +1019,7 @@
1019
1019
  },
1020
1020
  "locationInModule": {
1021
1021
  "filename": "src/awscdk/base.ts",
1022
- "line": 621
1022
+ "line": 687
1023
1023
  },
1024
1024
  "name": "createPersonalStage",
1025
1025
  "protected": true
@@ -1031,7 +1031,7 @@
1031
1031
  },
1032
1032
  "locationInModule": {
1033
1033
  "filename": "src/awscdk/base.ts",
1034
- "line": 667
1034
+ "line": 733
1035
1035
  },
1036
1036
  "name": "createPipelineStage",
1037
1037
  "parameters": [
@@ -1054,7 +1054,7 @@
1054
1054
  },
1055
1055
  "locationInModule": {
1056
1056
  "filename": "src/awscdk/base.ts",
1057
- "line": 566
1057
+ "line": 632
1058
1058
  },
1059
1059
  "name": "createReleaseTasks",
1060
1060
  "protected": true
@@ -1065,7 +1065,7 @@
1065
1065
  },
1066
1066
  "locationInModule": {
1067
1067
  "filename": "src/awscdk/base.ts",
1068
- "line": 424
1068
+ "line": 490
1069
1069
  },
1070
1070
  "name": "createSafeStageName",
1071
1071
  "parameters": [
@@ -1090,7 +1090,7 @@
1090
1090
  },
1091
1091
  "locationInModule": {
1092
1092
  "filename": "src/awscdk/base.ts",
1093
- "line": 726
1093
+ "line": 792
1094
1094
  },
1095
1095
  "name": "createVersionFetchTask",
1096
1096
  "parameters": [
@@ -1110,7 +1110,7 @@
1110
1110
  },
1111
1111
  "locationInModule": {
1112
1112
  "filename": "src/awscdk/base.ts",
1113
- "line": 284
1113
+ "line": 324
1114
1114
  },
1115
1115
  "name": "engineType",
1116
1116
  "returns": {
@@ -1126,7 +1126,7 @@
1126
1126
  },
1127
1127
  "locationInModule": {
1128
1128
  "filename": "src/awscdk/base.ts",
1129
- "line": 772
1129
+ "line": 838
1130
1130
  },
1131
1131
  "name": "generateVersioningAppCode",
1132
1132
  "parameters": [
@@ -1150,7 +1150,7 @@
1150
1150
  },
1151
1151
  "locationInModule": {
1152
1152
  "filename": "src/awscdk/base.ts",
1153
- "line": 786
1153
+ "line": 852
1154
1154
  },
1155
1155
  "name": "generateVersioningImports",
1156
1156
  "returns": {
@@ -1166,7 +1166,7 @@
1166
1166
  },
1167
1167
  "locationInModule": {
1168
1168
  "filename": "src/awscdk/base.ts",
1169
- "line": 799
1169
+ "line": 865
1170
1170
  },
1171
1171
  "name": "generateVersioningUtilities",
1172
1172
  "returns": {
@@ -1181,7 +1181,7 @@
1181
1181
  },
1182
1182
  "locationInModule": {
1183
1183
  "filename": "src/awscdk/base.ts",
1184
- "line": 715
1184
+ "line": 781
1185
1185
  },
1186
1186
  "name": "getCliStackPattern",
1187
1187
  "parameters": [
@@ -1205,7 +1205,7 @@
1205
1205
  },
1206
1206
  "locationInModule": {
1207
1207
  "filename": "src/awscdk/base.ts",
1208
- "line": 366
1208
+ "line": 432
1209
1209
  },
1210
1210
  "name": "provideAssemblyUploadStep",
1211
1211
  "protected": true,
@@ -1221,7 +1221,7 @@
1221
1221
  },
1222
1222
  "locationInModule": {
1223
1223
  "filename": "src/awscdk/base.ts",
1224
- "line": 332
1224
+ "line": 398
1225
1225
  },
1226
1226
  "name": "provideAssetUploadStep",
1227
1227
  "parameters": [
@@ -1246,7 +1246,7 @@
1246
1246
  },
1247
1247
  "locationInModule": {
1248
1248
  "filename": "src/awscdk/base.ts",
1249
- "line": 376
1249
+ "line": 442
1250
1250
  },
1251
1251
  "name": "provideDeployStep",
1252
1252
  "parameters": [
@@ -1270,7 +1270,7 @@
1270
1270
  },
1271
1271
  "locationInModule": {
1272
1272
  "filename": "src/awscdk/base.ts",
1273
- "line": 388
1273
+ "line": 454
1274
1274
  },
1275
1275
  "name": "provideDiffStep",
1276
1276
  "parameters": [
@@ -1301,7 +1301,7 @@
1301
1301
  },
1302
1302
  "locationInModule": {
1303
1303
  "filename": "src/awscdk/base.ts",
1304
- "line": 286
1304
+ "line": 326
1305
1305
  },
1306
1306
  "name": "provideInstallStep",
1307
1307
  "protected": true,
@@ -1317,7 +1317,7 @@
1317
1317
  },
1318
1318
  "locationInModule": {
1319
1319
  "filename": "src/awscdk/base.ts",
1320
- "line": 308
1320
+ "line": 348
1321
1321
  },
1322
1322
  "name": "provideSynthStep",
1323
1323
  "protected": true,
@@ -1333,7 +1333,7 @@
1333
1333
  },
1334
1334
  "locationInModule": {
1335
1335
  "filename": "src/awscdk/base.ts",
1336
- "line": 402
1336
+ "line": 468
1337
1337
  },
1338
1338
  "name": "renderInstallPackageCommands",
1339
1339
  "parameters": [
@@ -1373,7 +1373,7 @@
1373
1373
  "immutable": true,
1374
1374
  "locationInModule": {
1375
1375
  "filename": "src/awscdk/base.ts",
1376
- "line": 225
1376
+ "line": 251
1377
1377
  },
1378
1378
  "name": "branchName",
1379
1379
  "type": {
@@ -1388,7 +1388,7 @@
1388
1388
  "immutable": true,
1389
1389
  "locationInModule": {
1390
1390
  "filename": "src/awscdk/base.ts",
1391
- "line": 228
1391
+ "line": 254
1392
1392
  },
1393
1393
  "name": "namePrefix",
1394
1394
  "protected": true,
@@ -1403,20 +1403,38 @@
1403
1403
  "immutable": true,
1404
1404
  "locationInModule": {
1405
1405
  "filename": "src/awscdk/base.ts",
1406
- "line": 224
1406
+ "line": 250
1407
1407
  },
1408
1408
  "name": "stackPrefix",
1409
1409
  "type": {
1410
1410
  "primitive": "string"
1411
1411
  }
1412
1412
  },
1413
+ {
1414
+ "docs": {
1415
+ "remarks": "Undefined when the pipeline is at the repository root.",
1416
+ "stability": "stable",
1417
+ "summary": "The working directory relative to the repository root for this pipeline."
1418
+ },
1419
+ "immutable": true,
1420
+ "locationInModule": {
1421
+ "filename": "src/awscdk/base.ts",
1422
+ "line": 260
1423
+ },
1424
+ "name": "workingDirectory",
1425
+ "optional": true,
1426
+ "protected": true,
1427
+ "type": {
1428
+ "primitive": "string"
1429
+ }
1430
+ },
1413
1431
  {
1414
1432
  "docs": {
1415
1433
  "stability": "stable"
1416
1434
  },
1417
1435
  "locationInModule": {
1418
1436
  "filename": "src/awscdk/base.ts",
1419
- "line": 230
1437
+ "line": 262
1420
1438
  },
1421
1439
  "name": "app",
1422
1440
  "protected": true,
@@ -1430,7 +1448,7 @@
1430
1448
  },
1431
1449
  "locationInModule": {
1432
1450
  "filename": "src/awscdk/base.ts",
1433
- "line": 230
1451
+ "line": 262
1434
1452
  },
1435
1453
  "name": "baseOptions",
1436
1454
  "protected": true,
@@ -1453,7 +1471,7 @@
1453
1471
  "kind": "interface",
1454
1472
  "locationInModule": {
1455
1473
  "filename": "src/awscdk/base.ts",
1456
- "line": 123
1474
+ "line": 124
1457
1475
  },
1458
1476
  "name": "CDKPipelineOptions",
1459
1477
  "properties": [
@@ -1466,7 +1484,7 @@
1466
1484
  "immutable": true,
1467
1485
  "locationInModule": {
1468
1486
  "filename": "src/awscdk/base.ts",
1469
- "line": 180
1487
+ "line": 181
1470
1488
  },
1471
1489
  "name": "iamRoleArns",
1472
1490
  "type": {
@@ -1482,7 +1500,7 @@
1482
1500
  "immutable": true,
1483
1501
  "locationInModule": {
1484
1502
  "filename": "src/awscdk/base.ts",
1485
- "line": 185
1503
+ "line": 186
1486
1504
  },
1487
1505
  "name": "stages",
1488
1506
  "type": {
@@ -1504,7 +1522,7 @@
1504
1522
  "immutable": true,
1505
1523
  "locationInModule": {
1506
1524
  "filename": "src/awscdk/base.ts",
1507
- "line": 137
1525
+ "line": 138
1508
1526
  },
1509
1527
  "name": "branchName",
1510
1528
  "optional": true,
@@ -1523,7 +1541,7 @@
1523
1541
  "immutable": true,
1524
1542
  "locationInModule": {
1525
1543
  "filename": "src/awscdk/base.ts",
1526
- "line": 166
1544
+ "line": 167
1527
1545
  },
1528
1546
  "name": "deploySubStacks",
1529
1547
  "optional": true,
@@ -1540,7 +1558,7 @@
1540
1558
  "immutable": true,
1541
1559
  "locationInModule": {
1542
1560
  "filename": "src/awscdk/base.ts",
1543
- "line": 194
1561
+ "line": 195
1544
1562
  },
1545
1563
  "name": "featureStages",
1546
1564
  "optional": true,
@@ -1557,7 +1575,7 @@
1557
1575
  "immutable": true,
1558
1576
  "locationInModule": {
1559
1577
  "filename": "src/awscdk/base.ts",
1560
- "line": 188
1578
+ "line": 189
1561
1579
  },
1562
1580
  "name": "independentStages",
1563
1581
  "optional": true,
@@ -1582,7 +1600,7 @@
1582
1600
  "immutable": true,
1583
1601
  "locationInModule": {
1584
1602
  "filename": "src/awscdk/base.ts",
1585
- "line": 150
1603
+ "line": 151
1586
1604
  },
1587
1605
  "name": "paths",
1588
1606
  "optional": true,
@@ -1604,7 +1622,7 @@
1604
1622
  "immutable": true,
1605
1623
  "locationInModule": {
1606
1624
  "filename": "src/awscdk/base.ts",
1607
- "line": 191
1625
+ "line": 192
1608
1626
  },
1609
1627
  "name": "personalStage",
1610
1628
  "optional": true,
@@ -1622,7 +1640,7 @@
1622
1640
  "immutable": true,
1623
1641
  "locationInModule": {
1624
1642
  "filename": "src/awscdk/base.ts",
1625
- "line": 131
1643
+ "line": 132
1626
1644
  },
1627
1645
  "name": "pipelineName",
1628
1646
  "optional": true,
@@ -1641,7 +1659,7 @@
1641
1659
  "immutable": true,
1642
1660
  "locationInModule": {
1643
1661
  "filename": "src/awscdk/base.ts",
1644
- "line": 177
1662
+ "line": 178
1645
1663
  },
1646
1664
  "name": "pkgNamespace",
1647
1665
  "optional": true,
@@ -1657,7 +1675,7 @@
1657
1675
  "immutable": true,
1658
1676
  "locationInModule": {
1659
1677
  "filename": "src/awscdk/base.ts",
1660
- "line": 207
1678
+ "line": 208
1661
1679
  },
1662
1680
  "name": "postSynthCommands",
1663
1681
  "optional": true,
@@ -1678,7 +1696,7 @@
1678
1696
  "immutable": true,
1679
1697
  "locationInModule": {
1680
1698
  "filename": "src/awscdk/base.ts",
1681
- "line": 211
1699
+ "line": 212
1682
1700
  },
1683
1701
  "name": "postSynthSteps",
1684
1702
  "optional": true,
@@ -1691,6 +1709,25 @@
1691
1709
  }
1692
1710
  }
1693
1711
  },
1712
+ {
1713
+ "abstract": true,
1714
+ "docs": {
1715
+ "default": "- no pre-build command",
1716
+ "remarks": "When a workingDirectory is set (monorepo subproject), the command is\nautomatically wrapped to execute from the repository root regardless of\nthe job's working directory setting.\n\nFor pnpm workspaces: `pnpm -r --filter <appname>^... run build`\nFor npm workspaces: `npm run build --workspaces --if-present`\nFor yarn workspaces: `yarn workspaces foreach -Rt run build`",
1717
+ "stability": "stable",
1718
+ "summary": "A command to run before the build step, executed from the repository root."
1719
+ },
1720
+ "immutable": true,
1721
+ "locationInModule": {
1722
+ "filename": "src/awscdk/base.ts",
1723
+ "line": 237
1724
+ },
1725
+ "name": "preBuildCommand",
1726
+ "optional": true,
1727
+ "type": {
1728
+ "primitive": "string"
1729
+ }
1730
+ },
1694
1731
  {
1695
1732
  "abstract": true,
1696
1733
  "docs": {
@@ -1699,7 +1736,7 @@
1699
1736
  "immutable": true,
1700
1737
  "locationInModule": {
1701
1738
  "filename": "src/awscdk/base.ts",
1702
- "line": 205
1739
+ "line": 206
1703
1740
  },
1704
1741
  "name": "preInstallCommands",
1705
1742
  "optional": true,
@@ -1720,7 +1757,7 @@
1720
1757
  "immutable": true,
1721
1758
  "locationInModule": {
1722
1759
  "filename": "src/awscdk/base.ts",
1723
- "line": 209
1760
+ "line": 210
1724
1761
  },
1725
1762
  "name": "preInstallSteps",
1726
1763
  "optional": true,
@@ -1741,7 +1778,7 @@
1741
1778
  "immutable": true,
1742
1779
  "locationInModule": {
1743
1780
  "filename": "src/awscdk/base.ts",
1744
- "line": 206
1781
+ "line": 207
1745
1782
  },
1746
1783
  "name": "preSynthCommands",
1747
1784
  "optional": true,
@@ -1762,7 +1799,7 @@
1762
1799
  "immutable": true,
1763
1800
  "locationInModule": {
1764
1801
  "filename": "src/awscdk/base.ts",
1765
- "line": 210
1802
+ "line": 211
1766
1803
  },
1767
1804
  "name": "preSynthSteps",
1768
1805
  "optional": true,
@@ -1785,7 +1822,7 @@
1785
1822
  "immutable": true,
1786
1823
  "locationInModule": {
1787
1824
  "filename": "src/awscdk/base.ts",
1788
- "line": 158
1825
+ "line": 159
1789
1826
  },
1790
1827
  "name": "stackPrefix",
1791
1828
  "optional": true,
@@ -1802,13 +1839,32 @@
1802
1839
  "immutable": true,
1803
1840
  "locationInModule": {
1804
1841
  "filename": "src/awscdk/base.ts",
1805
- "line": 216
1842
+ "line": 242
1806
1843
  },
1807
1844
  "name": "versioning",
1808
1845
  "optional": true,
1809
1846
  "type": {
1810
1847
  "fqn": "projen-pipelines.VersioningConfig"
1811
1848
  }
1849
+ },
1850
+ {
1851
+ "abstract": true,
1852
+ "docs": {
1853
+ "default": "- automatically computed from the project's position in the monorepo (empty string for root projects)",
1854
+ "remarks": "This is automatically computed for subprojects but can be explicitly set.\n\nWhen set, CI jobs will run commands in this directory, and artifact paths\nwill be prefixed accordingly.",
1855
+ "stability": "stable",
1856
+ "summary": "The working directory for the pipeline relative to the repository root."
1857
+ },
1858
+ "immutable": true,
1859
+ "locationInModule": {
1860
+ "filename": "src/awscdk/base.ts",
1861
+ "line": 223
1862
+ },
1863
+ "name": "workingDirectory",
1864
+ "optional": true,
1865
+ "type": {
1866
+ "primitive": "string"
1867
+ }
1812
1868
  }
1813
1869
  ],
1814
1870
  "symbolId": "src/awscdk/base:CDKPipelineOptions"
@@ -1822,7 +1878,7 @@
1822
1878
  "kind": "enum",
1823
1879
  "locationInModule": {
1824
1880
  "filename": "src/awscdk/base.ts",
1825
- "line": 39
1881
+ "line": 40
1826
1882
  },
1827
1883
  "members": [
1828
1884
  {
@@ -2855,7 +2911,7 @@
2855
2911
  "kind": "interface",
2856
2912
  "locationInModule": {
2857
2913
  "filename": "src/awscdk/base.ts",
2858
- "line": 51
2914
+ "line": 52
2859
2915
  },
2860
2916
  "name": "DeploymentStage",
2861
2917
  "properties": [
@@ -2867,7 +2923,7 @@
2867
2923
  "immutable": true,
2868
2924
  "locationInModule": {
2869
2925
  "filename": "src/awscdk/base.ts",
2870
- "line": 52
2926
+ "line": 53
2871
2927
  },
2872
2928
  "name": "manualApproval",
2873
2929
  "optional": true,
@@ -3503,7 +3559,7 @@
3503
3559
  "kind": "interface",
3504
3560
  "locationInModule": {
3505
3561
  "filename": "src/awscdk/base.ts",
3506
- "line": 13
3562
+ "line": 14
3507
3563
  },
3508
3564
  "name": "Environment",
3509
3565
  "properties": [
@@ -3517,7 +3573,7 @@
3517
3573
  "immutable": true,
3518
3574
  "locationInModule": {
3519
3575
  "filename": "src/awscdk/base.ts",
3520
- "line": 19
3576
+ "line": 20
3521
3577
  },
3522
3578
  "name": "account",
3523
3579
  "type": {
@@ -3534,7 +3590,7 @@
3534
3590
  "immutable": true,
3535
3591
  "locationInModule": {
3536
3592
  "filename": "src/awscdk/base.ts",
3537
- "line": 26
3593
+ "line": 27
3538
3594
  },
3539
3595
  "name": "region",
3540
3596
  "type": {
@@ -4186,7 +4242,7 @@
4186
4242
  },
4187
4243
  "locationInModule": {
4188
4244
  "filename": "src/awscdk/github.ts",
4189
- "line": 74
4245
+ "line": 76
4190
4246
  },
4191
4247
  "parameters": [
4192
4248
  {
@@ -4222,7 +4278,7 @@
4222
4278
  },
4223
4279
  "locationInModule": {
4224
4280
  "filename": "src/awscdk/github.ts",
4225
- "line": 309
4281
+ "line": 348
4226
4282
  },
4227
4283
  "name": "createAssetUpload",
4228
4284
  "parameters": [
@@ -4249,7 +4305,7 @@
4249
4305
  },
4250
4306
  "locationInModule": {
4251
4307
  "filename": "src/awscdk/github.ts",
4252
- "line": 364
4308
+ "line": 404
4253
4309
  },
4254
4310
  "name": "createDeployment",
4255
4311
  "parameters": [
@@ -4278,7 +4334,7 @@
4278
4334
  },
4279
4335
  "locationInModule": {
4280
4336
  "filename": "src/awscdk/github.ts",
4281
- "line": 141
4337
+ "line": 177
4282
4338
  },
4283
4339
  "name": "createFeatureWorkflows",
4284
4340
  "protected": true
@@ -4290,7 +4346,7 @@
4290
4346
  },
4291
4347
  "locationInModule": {
4292
4348
  "filename": "src/awscdk/github.ts",
4293
- "line": 486
4349
+ "line": 528
4294
4350
  },
4295
4351
  "name": "createIndependentDeployment",
4296
4352
  "parameters": [
@@ -4312,7 +4368,7 @@
4312
4368
  },
4313
4369
  "locationInModule": {
4314
4370
  "filename": "src/awscdk/github.ts",
4315
- "line": 134
4371
+ "line": 144
4316
4372
  },
4317
4373
  "name": "engineType",
4318
4374
  "overrides": "projen-pipelines.CDKPipeline",
@@ -4346,7 +4402,7 @@
4346
4402
  },
4347
4403
  "locationInModule": {
4348
4404
  "filename": "src/awscdk/github.ts",
4349
- "line": 66
4405
+ "line": 68
4350
4406
  },
4351
4407
  "name": "useGithubPackages",
4352
4408
  "protected": true,
@@ -4360,7 +4416,7 @@
4360
4416
  },
4361
4417
  "locationInModule": {
4362
4418
  "filename": "src/awscdk/github.ts",
4363
- "line": 67
4419
+ "line": 69
4364
4420
  },
4365
4421
  "name": "minNodeVersion",
4366
4422
  "optional": true,
@@ -4721,7 +4777,7 @@
4721
4777
  },
4722
4778
  "locationInModule": {
4723
4779
  "filename": "src/awscdk/gitlab.ts",
4724
- "line": 170
4780
+ "line": 183
4725
4781
  },
4726
4782
  "name": "createAssetUpload",
4727
4783
  "protected": true
@@ -4734,7 +4790,7 @@
4734
4790
  },
4735
4791
  "locationInModule": {
4736
4792
  "filename": "src/awscdk/gitlab.ts",
4737
- "line": 203
4793
+ "line": 216
4738
4794
  },
4739
4795
  "name": "createDeployment",
4740
4796
  "parameters": [
@@ -4756,7 +4812,7 @@
4756
4812
  },
4757
4813
  "locationInModule": {
4758
4814
  "filename": "src/awscdk/gitlab.ts",
4759
- "line": 133
4815
+ "line": 136
4760
4816
  },
4761
4817
  "name": "createFeatureWorkflows",
4762
4818
  "protected": true
@@ -4768,7 +4824,7 @@
4768
4824
  },
4769
4825
  "locationInModule": {
4770
4826
  "filename": "src/awscdk/gitlab.ts",
4771
- "line": 265
4827
+ "line": 278
4772
4828
  },
4773
4829
  "name": "createIndependentDeployment",
4774
4830
  "parameters": [
@@ -4791,7 +4847,7 @@
4791
4847
  },
4792
4848
  "locationInModule": {
4793
4849
  "filename": "src/awscdk/gitlab.ts",
4794
- "line": 143
4850
+ "line": 156
4795
4851
  },
4796
4852
  "name": "createSynth",
4797
4853
  "protected": true
@@ -4802,7 +4858,7 @@
4802
4858
  },
4803
4859
  "locationInModule": {
4804
4860
  "filename": "src/awscdk/gitlab.ts",
4805
- "line": 297
4861
+ "line": 310
4806
4862
  },
4807
4863
  "name": "engineType",
4808
4864
  "overrides": "projen-pipelines.CDKPipeline",
@@ -5521,7 +5577,7 @@
5521
5577
  "kind": "interface",
5522
5578
  "locationInModule": {
5523
5579
  "filename": "src/awscdk/base.ts",
5524
- "line": 97
5580
+ "line": 98
5525
5581
  },
5526
5582
  "name": "IamRoleConfig",
5527
5583
  "properties": [
@@ -5534,7 +5590,7 @@
5534
5590
  "immutable": true,
5535
5591
  "locationInModule": {
5536
5592
  "filename": "src/awscdk/base.ts",
5537
- "line": 103
5593
+ "line": 104
5538
5594
  },
5539
5595
  "name": "assetPublishing",
5540
5596
  "optional": true,
@@ -5551,7 +5607,7 @@
5551
5607
  "immutable": true,
5552
5608
  "locationInModule": {
5553
5609
  "filename": "src/awscdk/base.ts",
5554
- "line": 105
5610
+ "line": 106
5555
5611
  },
5556
5612
  "name": "assetPublishingPerStage",
5557
5613
  "optional": true,
@@ -5573,7 +5629,7 @@
5573
5629
  "immutable": true,
5574
5630
  "locationInModule": {
5575
5631
  "filename": "src/awscdk/base.ts",
5576
- "line": 99
5632
+ "line": 100
5577
5633
  },
5578
5634
  "name": "default",
5579
5635
  "optional": true,
@@ -5590,7 +5646,7 @@
5590
5646
  "immutable": true,
5591
5647
  "locationInModule": {
5592
5648
  "filename": "src/awscdk/base.ts",
5593
- "line": 109
5649
+ "line": 110
5594
5650
  },
5595
5651
  "name": "deployment",
5596
5652
  "optional": true,
@@ -5612,7 +5668,7 @@
5612
5668
  "immutable": true,
5613
5669
  "locationInModule": {
5614
5670
  "filename": "src/awscdk/base.ts",
5615
- "line": 107
5671
+ "line": 108
5616
5672
  },
5617
5673
  "name": "diff",
5618
5674
  "optional": true,
@@ -5635,7 +5691,7 @@
5635
5691
  "immutable": true,
5636
5692
  "locationInModule": {
5637
5693
  "filename": "src/awscdk/base.ts",
5638
- "line": 114
5694
+ "line": 115
5639
5695
  },
5640
5696
  "name": "jump",
5641
5697
  "optional": true,
@@ -5657,7 +5713,7 @@
5657
5713
  "immutable": true,
5658
5714
  "locationInModule": {
5659
5715
  "filename": "src/awscdk/base.ts",
5660
- "line": 101
5716
+ "line": 102
5661
5717
  },
5662
5718
  "name": "synth",
5663
5719
  "optional": true,
@@ -5682,7 +5738,7 @@
5682
5738
  "kind": "interface",
5683
5739
  "locationInModule": {
5684
5740
  "filename": "src/awscdk/base.ts",
5685
- "line": 58
5741
+ "line": 59
5686
5742
  },
5687
5743
  "name": "IndependentStage",
5688
5744
  "properties": [
@@ -5696,7 +5752,7 @@
5696
5752
  "immutable": true,
5697
5753
  "locationInModule": {
5698
5754
  "filename": "src/awscdk/base.ts",
5699
- "line": 64
5755
+ "line": 65
5700
5756
  },
5701
5757
  "name": "deployOnPush",
5702
5758
  "optional": true,
@@ -5721,7 +5777,7 @@
5721
5777
  "kind": "interface",
5722
5778
  "locationInModule": {
5723
5779
  "filename": "src/awscdk/base.ts",
5724
- "line": 70
5780
+ "line": 71
5725
5781
  },
5726
5782
  "name": "NamedStageOptions",
5727
5783
  "properties": [
@@ -5733,7 +5789,7 @@
5733
5789
  "immutable": true,
5734
5790
  "locationInModule": {
5735
5791
  "filename": "src/awscdk/base.ts",
5736
- "line": 71
5792
+ "line": 72
5737
5793
  },
5738
5794
  "name": "name",
5739
5795
  "type": {
@@ -5748,7 +5804,7 @@
5748
5804
  "immutable": true,
5749
5805
  "locationInModule": {
5750
5806
  "filename": "src/awscdk/base.ts",
5751
- "line": 82
5807
+ "line": 83
5752
5808
  },
5753
5809
  "name": "diffType",
5754
5810
  "optional": true,
@@ -5767,7 +5823,7 @@
5767
5823
  "immutable": true,
5768
5824
  "locationInModule": {
5769
5825
  "filename": "src/awscdk/base.ts",
5770
- "line": 79
5826
+ "line": 80
5771
5827
  },
5772
5828
  "name": "githubEnvironment",
5773
5829
  "optional": true,
@@ -5783,7 +5839,7 @@
5783
5839
  "immutable": true,
5784
5840
  "locationInModule": {
5785
5841
  "filename": "src/awscdk/base.ts",
5786
- "line": 84
5842
+ "line": 85
5787
5843
  },
5788
5844
  "name": "postDeploySteps",
5789
5845
  "optional": true,
@@ -5804,7 +5860,7 @@
5804
5860
  "immutable": true,
5805
5861
  "locationInModule": {
5806
5862
  "filename": "src/awscdk/base.ts",
5807
- "line": 83
5863
+ "line": 84
5808
5864
  },
5809
5865
  "name": "postDiffSteps",
5810
5866
  "optional": true,
@@ -5825,7 +5881,7 @@
5825
5881
  "immutable": true,
5826
5882
  "locationInModule": {
5827
5883
  "filename": "src/awscdk/base.ts",
5828
- "line": 81
5884
+ "line": 82
5829
5885
  },
5830
5886
  "name": "watchable",
5831
5887
  "optional": true,
@@ -6845,7 +6901,7 @@
6845
6901
  "kind": "interface",
6846
6902
  "locationInModule": {
6847
6903
  "filename": "src/awscdk/base.ts",
6848
- "line": 90
6904
+ "line": 91
6849
6905
  },
6850
6906
  "name": "StageOptions",
6851
6907
  "properties": [
@@ -6857,7 +6913,7 @@
6857
6913
  "immutable": true,
6858
6914
  "locationInModule": {
6859
6915
  "filename": "src/awscdk/base.ts",
6860
- "line": 91
6916
+ "line": 92
6861
6917
  },
6862
6918
  "name": "env",
6863
6919
  "type": {
@@ -8861,6 +8917,6 @@
8861
8917
  "symbolId": "src/versioning/types:VersioningStrategyComponents"
8862
8918
  }
8863
8919
  },
8864
- "version": "0.3.17",
8865
- "fingerprint": "bvWxakB9JRWMLymXUTyROa264zJXE7AS0IfGFEqZXls="
8920
+ "version": "0.3.19",
8921
+ "fingerprint": "tw2ahT2/J20faDtheoRPVSJlYvjsIUvwg2A7FkINwkk="
8866
8922
  }