projen-pipelines 0.2.14 → 0.3.0

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.
package/.jsii CHANGED
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "constructs": "^10.4.2",
19
- "projen": ">=0.91.20 <1.0.0"
19
+ "projen": ">=0.96.3 <1.0.0"
20
20
  },
21
21
  "dependencyClosure": {
22
22
  "constructs": {
@@ -57,6 +57,7 @@
57
57
  "projen.gitlab": {},
58
58
  "projen.java": {},
59
59
  "projen.javascript": {},
60
+ "projen.javascript.biome_config": {},
60
61
  "projen.python": {},
61
62
  "projen.release": {},
62
63
  "projen.typescript": {},
@@ -106,7 +107,7 @@
106
107
  },
107
108
  "name": "projen-pipelines",
108
109
  "readme": {
109
- "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\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## 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"
110
+ "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### 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"
110
111
  },
111
112
  "repository": {
112
113
  "type": "git",
@@ -119,6 +120,241 @@
119
120
  }
120
121
  },
121
122
  "types": {
123
+ "projen-pipelines.AmplifyDeployStep": {
124
+ "assembly": "projen-pipelines",
125
+ "base": "projen-pipelines.PipelineStep",
126
+ "docs": {
127
+ "stability": "stable",
128
+ "summary": "A step that deploys a web application to AWS Amplify."
129
+ },
130
+ "fqn": "projen-pipelines.AmplifyDeployStep",
131
+ "initializer": {
132
+ "docs": {
133
+ "stability": "stable"
134
+ },
135
+ "locationInModule": {
136
+ "filename": "src/steps/amplify-deploy.step.ts",
137
+ "line": 30
138
+ },
139
+ "parameters": [
140
+ {
141
+ "docs": {
142
+ "summary": "- The projen project reference."
143
+ },
144
+ "name": "project",
145
+ "type": {
146
+ "fqn": "projen.Project"
147
+ }
148
+ },
149
+ {
150
+ "name": "config",
151
+ "type": {
152
+ "fqn": "projen-pipelines.AmplifyDeployStepConfig"
153
+ }
154
+ }
155
+ ]
156
+ },
157
+ "kind": "class",
158
+ "locationInModule": {
159
+ "filename": "src/steps/amplify-deploy.step.ts",
160
+ "line": 25
161
+ },
162
+ "methods": [
163
+ {
164
+ "docs": {
165
+ "remarks": "Should be implemented by subclasses.",
166
+ "stability": "stable",
167
+ "summary": "Generates a configuration for a bash script step."
168
+ },
169
+ "locationInModule": {
170
+ "filename": "src/steps/amplify-deploy.step.ts",
171
+ "line": 165
172
+ },
173
+ "name": "toBash",
174
+ "overrides": "projen-pipelines.PipelineStep",
175
+ "returns": {
176
+ "type": {
177
+ "fqn": "projen-pipelines.BashStepConfig"
178
+ }
179
+ }
180
+ },
181
+ {
182
+ "docs": {
183
+ "remarks": "Should be implemented by subclasses.",
184
+ "stability": "stable",
185
+ "summary": "Generates a configuration for a CodeCatalyst Actions step."
186
+ },
187
+ "locationInModule": {
188
+ "filename": "src/steps/amplify-deploy.step.ts",
189
+ "line": 181
190
+ },
191
+ "name": "toCodeCatalyst",
192
+ "overrides": "projen-pipelines.PipelineStep",
193
+ "returns": {
194
+ "type": {
195
+ "fqn": "projen-pipelines.CodeCatalystStepConfig"
196
+ }
197
+ }
198
+ },
199
+ {
200
+ "docs": {
201
+ "remarks": "Should be implemented by subclasses.",
202
+ "stability": "stable",
203
+ "summary": "Generates a configuration for a GitHub Actions step."
204
+ },
205
+ "locationInModule": {
206
+ "filename": "src/steps/amplify-deploy.step.ts",
207
+ "line": 124
208
+ },
209
+ "name": "toGithub",
210
+ "overrides": "projen-pipelines.PipelineStep",
211
+ "returns": {
212
+ "type": {
213
+ "fqn": "projen-pipelines.GithubStepConfig"
214
+ }
215
+ }
216
+ },
217
+ {
218
+ "docs": {
219
+ "remarks": "Should be implemented by subclasses.",
220
+ "stability": "stable",
221
+ "summary": "Generates a configuration for a GitLab CI step."
222
+ },
223
+ "locationInModule": {
224
+ "filename": "src/steps/amplify-deploy.step.ts",
225
+ "line": 104
226
+ },
227
+ "name": "toGitlab",
228
+ "overrides": "projen-pipelines.PipelineStep",
229
+ "returns": {
230
+ "type": {
231
+ "fqn": "projen-pipelines.GitlabStepConfig"
232
+ }
233
+ }
234
+ }
235
+ ],
236
+ "name": "AmplifyDeployStep",
237
+ "symbolId": "src/steps/amplify-deploy.step:AmplifyDeployStep"
238
+ },
239
+ "projen-pipelines.AmplifyDeployStepConfig": {
240
+ "assembly": "projen-pipelines",
241
+ "datatype": true,
242
+ "docs": {
243
+ "stability": "stable",
244
+ "summary": "Configuration for an AWS Amplify deployment step."
245
+ },
246
+ "fqn": "projen-pipelines.AmplifyDeployStepConfig",
247
+ "kind": "interface",
248
+ "locationInModule": {
249
+ "filename": "src/steps/amplify-deploy.step.ts",
250
+ "line": 7
251
+ },
252
+ "name": "AmplifyDeployStepConfig",
253
+ "properties": [
254
+ {
255
+ "abstract": true,
256
+ "docs": {
257
+ "stability": "stable",
258
+ "summary": "The artifact file to deploy (zip file containing the build)."
259
+ },
260
+ "immutable": true,
261
+ "locationInModule": {
262
+ "filename": "src/steps/amplify-deploy.step.ts",
263
+ "line": 13
264
+ },
265
+ "name": "artifactFile",
266
+ "type": {
267
+ "primitive": "string"
268
+ }
269
+ },
270
+ {
271
+ "abstract": true,
272
+ "docs": {
273
+ "stability": "stable",
274
+ "summary": "The Amplify app ID (static value)."
275
+ },
276
+ "immutable": true,
277
+ "locationInModule": {
278
+ "filename": "src/steps/amplify-deploy.step.ts",
279
+ "line": 9
280
+ },
281
+ "name": "appId",
282
+ "optional": true,
283
+ "type": {
284
+ "primitive": "string"
285
+ }
286
+ },
287
+ {
288
+ "abstract": true,
289
+ "docs": {
290
+ "stability": "stable",
291
+ "summary": "Command to retrieve the Amplify app ID dynamically."
292
+ },
293
+ "immutable": true,
294
+ "locationInModule": {
295
+ "filename": "src/steps/amplify-deploy.step.ts",
296
+ "line": 11
297
+ },
298
+ "name": "appIdCommand",
299
+ "optional": true,
300
+ "type": {
301
+ "primitive": "string"
302
+ }
303
+ },
304
+ {
305
+ "abstract": true,
306
+ "docs": {
307
+ "stability": "stable",
308
+ "summary": "The branch name to deploy to (defaults to 'main')."
309
+ },
310
+ "immutable": true,
311
+ "locationInModule": {
312
+ "filename": "src/steps/amplify-deploy.step.ts",
313
+ "line": 15
314
+ },
315
+ "name": "branchName",
316
+ "optional": true,
317
+ "type": {
318
+ "primitive": "string"
319
+ }
320
+ },
321
+ {
322
+ "abstract": true,
323
+ "docs": {
324
+ "stability": "stable",
325
+ "summary": "Environment name."
326
+ },
327
+ "immutable": true,
328
+ "locationInModule": {
329
+ "filename": "src/steps/amplify-deploy.step.ts",
330
+ "line": 19
331
+ },
332
+ "name": "environment",
333
+ "optional": true,
334
+ "type": {
335
+ "primitive": "string"
336
+ }
337
+ },
338
+ {
339
+ "abstract": true,
340
+ "docs": {
341
+ "stability": "stable",
342
+ "summary": "The AWS region (defaults to 'eu-central-1')."
343
+ },
344
+ "immutable": true,
345
+ "locationInModule": {
346
+ "filename": "src/steps/amplify-deploy.step.ts",
347
+ "line": 17
348
+ },
349
+ "name": "region",
350
+ "optional": true,
351
+ "type": {
352
+ "primitive": "string"
353
+ }
354
+ }
355
+ ],
356
+ "symbolId": "src/steps/amplify-deploy.step:AmplifyDeployStepConfig"
357
+ },
122
358
  "projen-pipelines.ApproverMapping": {
123
359
  "assembly": "projen-pipelines",
124
360
  "datatype": true,
@@ -1802,7 +2038,9 @@
1802
2038
  "assembly": "projen-pipelines",
1803
2039
  "base": "projen-pipelines.StepSequence",
1804
2040
  "docs": {
1805
- "stability": "stable"
2041
+ "remarks": "The environment variable name can be configured to avoid conflicts with other environment variables.\nThe default is CODEARTIFACT_AUTH_TOKEN.",
2042
+ "stability": "stable",
2043
+ "summary": "Step to login to CodeArtifact."
1806
2044
  },
1807
2045
  "fqn": "projen-pipelines.CodeArtifactLoginStep",
1808
2046
  "initializer": {
@@ -1811,7 +2049,7 @@
1811
2049
  },
1812
2050
  "locationInModule": {
1813
2051
  "filename": "src/steps/registries.ts",
1814
- "line": 42
2052
+ "line": 96
1815
2053
  },
1816
2054
  "parameters": [
1817
2055
  {
@@ -1834,7 +2072,7 @@
1834
2072
  "kind": "class",
1835
2073
  "locationInModule": {
1836
2074
  "filename": "src/steps/registries.ts",
1837
- "line": 41
2075
+ "line": 95
1838
2076
  },
1839
2077
  "name": "CodeArtifactLoginStep",
1840
2078
  "properties": [
@@ -1844,7 +2082,7 @@
1844
2082
  },
1845
2083
  "locationInModule": {
1846
2084
  "filename": "src/steps/registries.ts",
1847
- "line": 42
2085
+ "line": 96
1848
2086
  },
1849
2087
  "name": "options",
1850
2088
  "protected": true,
@@ -1859,13 +2097,14 @@
1859
2097
  "assembly": "projen-pipelines",
1860
2098
  "datatype": true,
1861
2099
  "docs": {
1862
- "stability": "stable"
2100
+ "stability": "stable",
2101
+ "summary": "Options for the CodeArtifactLoginStep."
1863
2102
  },
1864
2103
  "fqn": "projen-pipelines.CodeArtifactLoginStepOptions",
1865
2104
  "kind": "interface",
1866
2105
  "locationInModule": {
1867
2106
  "filename": "src/steps/registries.ts",
1868
- "line": 34
2107
+ "line": 75
1869
2108
  },
1870
2109
  "name": "CodeArtifactLoginStepOptions",
1871
2110
  "properties": [
@@ -1877,7 +2116,7 @@
1877
2116
  "immutable": true,
1878
2117
  "locationInModule": {
1879
2118
  "filename": "src/steps/registries.ts",
1880
- "line": 37
2119
+ "line": 78
1881
2120
  },
1882
2121
  "name": "domainName",
1883
2122
  "type": {
@@ -1892,7 +2131,7 @@
1892
2131
  "immutable": true,
1893
2132
  "locationInModule": {
1894
2133
  "filename": "src/steps/registries.ts",
1895
- "line": 35
2134
+ "line": 76
1896
2135
  },
1897
2136
  "name": "ownerAccount",
1898
2137
  "type": {
@@ -1907,7 +2146,7 @@
1907
2146
  "immutable": true,
1908
2147
  "locationInModule": {
1909
2148
  "filename": "src/steps/registries.ts",
1910
- "line": 36
2149
+ "line": 77
1911
2150
  },
1912
2151
  "name": "region",
1913
2152
  "type": {
@@ -1922,12 +2161,30 @@
1922
2161
  "immutable": true,
1923
2162
  "locationInModule": {
1924
2163
  "filename": "src/steps/registries.ts",
1925
- "line": 38
2164
+ "line": 79
1926
2165
  },
1927
2166
  "name": "role",
1928
2167
  "type": {
1929
2168
  "primitive": "string"
1930
2169
  }
2170
+ },
2171
+ {
2172
+ "abstract": true,
2173
+ "docs": {
2174
+ "default": "'CODEARTIFACT_AUTH_TOKEN'",
2175
+ "stability": "stable",
2176
+ "summary": "The environment variable name to set."
2177
+ },
2178
+ "immutable": true,
2179
+ "locationInModule": {
2180
+ "filename": "src/steps/registries.ts",
2181
+ "line": 86
2182
+ },
2183
+ "name": "envVariableName",
2184
+ "optional": true,
2185
+ "type": {
2186
+ "primitive": "string"
2187
+ }
1931
2188
  }
1932
2189
  ],
1933
2190
  "symbolId": "src/steps/registries:CodeArtifactLoginStepOptions"
@@ -3764,7 +4021,7 @@
3764
4021
  },
3765
4022
  "locationInModule": {
3766
4023
  "filename": "src/awscdk/github.ts",
3767
- "line": 282
4024
+ "line": 285
3768
4025
  },
3769
4026
  "name": "createAssetUpload"
3770
4027
  },
@@ -3775,7 +4032,7 @@
3775
4032
  },
3776
4033
  "locationInModule": {
3777
4034
  "filename": "src/awscdk/github.ts",
3778
- "line": 337
4035
+ "line": 340
3779
4036
  },
3780
4037
  "name": "createDeployment",
3781
4038
  "parameters": [
@@ -3809,7 +4066,7 @@
3809
4066
  },
3810
4067
  "locationInModule": {
3811
4068
  "filename": "src/awscdk/github.ts",
3812
- "line": 453
4069
+ "line": 456
3813
4070
  },
3814
4071
  "name": "createIndependentDeployment",
3815
4072
  "parameters": [
@@ -3976,7 +4233,9 @@
3976
4233
  "assembly": "projen-pipelines",
3977
4234
  "base": "projen-pipelines.PipelineStep",
3978
4235
  "docs": {
3979
- "stability": "stable"
4236
+ "remarks": "Only supported for GitHub as it is GitHub specific.",
4237
+ "stability": "stable",
4238
+ "summary": "Step to set the GITHUB_TOKEN environment variable from a secret."
3980
4239
  },
3981
4240
  "fqn": "projen-pipelines.GithubPackagesLoginStep",
3982
4241
  "initializer": {
@@ -3985,7 +4244,7 @@
3985
4244
  },
3986
4245
  "locationInModule": {
3987
4246
  "filename": "src/steps/registries.ts",
3988
- "line": 18
4247
+ "line": 23
3989
4248
  },
3990
4249
  "parameters": [
3991
4250
  {
@@ -4008,7 +4267,7 @@
4008
4267
  "kind": "class",
4009
4268
  "locationInModule": {
4010
4269
  "filename": "src/steps/registries.ts",
4011
- "line": 16
4270
+ "line": 21
4012
4271
  },
4013
4272
  "methods": [
4014
4273
  {
@@ -4019,7 +4278,7 @@
4019
4278
  },
4020
4279
  "locationInModule": {
4021
4280
  "filename": "src/steps/registries.ts",
4022
- "line": 22
4281
+ "line": 27
4023
4282
  },
4024
4283
  "name": "toGithub",
4025
4284
  "overrides": "projen-pipelines.PipelineStep",
@@ -5292,6 +5551,104 @@
5292
5551
  ],
5293
5552
  "symbolId": "src/awscdk/base:NamedStageOptions"
5294
5553
  },
5554
+ "projen-pipelines.NpmSecretStep": {
5555
+ "assembly": "projen-pipelines",
5556
+ "base": "projen-pipelines.PipelineStep",
5557
+ "docs": {
5558
+ "remarks": "Currently only supported and needed for GitHub.\nGitlab sets the NPM_TOKEN environment variable automatically from the project's settings.",
5559
+ "stability": "stable",
5560
+ "summary": "Step to set the NPM_TOKEN environment variable from a secret."
5561
+ },
5562
+ "fqn": "projen-pipelines.NpmSecretStep",
5563
+ "initializer": {
5564
+ "docs": {
5565
+ "stability": "stable"
5566
+ },
5567
+ "locationInModule": {
5568
+ "filename": "src/steps/registries.ts",
5569
+ "line": 56
5570
+ },
5571
+ "parameters": [
5572
+ {
5573
+ "docs": {
5574
+ "summary": "- The projen project reference."
5575
+ },
5576
+ "name": "project",
5577
+ "type": {
5578
+ "fqn": "projen.Project"
5579
+ }
5580
+ },
5581
+ {
5582
+ "name": "options",
5583
+ "type": {
5584
+ "fqn": "projen-pipelines.NpmSecretStepOptions"
5585
+ }
5586
+ }
5587
+ ]
5588
+ },
5589
+ "kind": "class",
5590
+ "locationInModule": {
5591
+ "filename": "src/steps/registries.ts",
5592
+ "line": 54
5593
+ },
5594
+ "methods": [
5595
+ {
5596
+ "docs": {
5597
+ "remarks": "Should be implemented by subclasses.",
5598
+ "stability": "stable",
5599
+ "summary": "Generates a configuration for a GitHub Actions step."
5600
+ },
5601
+ "locationInModule": {
5602
+ "filename": "src/steps/registries.ts",
5603
+ "line": 60
5604
+ },
5605
+ "name": "toGithub",
5606
+ "overrides": "projen-pipelines.PipelineStep",
5607
+ "returns": {
5608
+ "type": {
5609
+ "fqn": "projen-pipelines.GithubStepConfig"
5610
+ }
5611
+ }
5612
+ }
5613
+ ],
5614
+ "name": "NpmSecretStep",
5615
+ "symbolId": "src/steps/registries:NpmSecretStep"
5616
+ },
5617
+ "projen-pipelines.NpmSecretStepOptions": {
5618
+ "assembly": "projen-pipelines",
5619
+ "datatype": true,
5620
+ "docs": {
5621
+ "stability": "stable"
5622
+ },
5623
+ "fqn": "projen-pipelines.NpmSecretStepOptions",
5624
+ "kind": "interface",
5625
+ "locationInModule": {
5626
+ "filename": "src/steps/registries.ts",
5627
+ "line": 39
5628
+ },
5629
+ "name": "NpmSecretStepOptions",
5630
+ "properties": [
5631
+ {
5632
+ "abstract": true,
5633
+ "docs": {
5634
+ "default": "'NPM_TOKEN'",
5635
+ "stability": "stable",
5636
+ "summary": "Name of the secret to set for the environment variable NPM_TOKEN."
5637
+ },
5638
+ "immutable": true,
5639
+ "locationInModule": {
5640
+ "filename": "src/steps/registries.ts",
5641
+ "line": 45
5642
+ },
5643
+ "name": "secretName",
5644
+ "optional": true,
5645
+ "type": {
5646
+ "primitive": "string"
5647
+ }
5648
+ }
5649
+ ],
5650
+ "symbolId": "src/steps/registries:NpmSecretStepOptions"
5651
+ },
5295
5652
  "projen-pipelines.OutputConfigBase": {
5296
5653
  "abstract": true,
5297
5654
  "assembly": "projen-pipelines",
@@ -8193,6 +8550,6 @@
8193
8550
  "symbolId": "src/versioning/types:VersioningStrategyComponents"
8194
8551
  }
8195
8552
  },
8196
- "version": "0.2.14",
8197
- "fingerprint": "vyhHYd0IBVpuIvW/a7YYcqe8tEXR+3BPadIiQn/Nj8M="
8553
+ "version": "0.3.0",
8554
+ "fingerprint": "F4jh5FMamVNEN3+4/Rg6IEzsRlWrxdmNwNyLnpeg31w="
8198
8555
  }