Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a GitHub Actions deployment pipeline that leverages AWS CDK along with infrastructure code updates to support a new GitHubDeploy stack for managing deployment permissions.
- Introduces GitHub Actions workflows for diffing and deploying CDK stacks.
- Adds a new GitHubDeploy stack for IAM role and policy setup for GitHub Actions.
- Updates the AppStage to conditionally include the GitHubDeploy stack in production and sets up stack dependencies.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/deploy/github-deploy.stack.ts | Adds GitHubDeploy stack with IAM roles and policies for CDK deployments. |
| src/app-stage.ts | Updates AppStage to instantiate GitHubDeploy conditionally and establishes dependencies. |
| .vscode/settings.json | Configures the default formatter for GitHub Actions workflow files. |
| .github/workflows/prepare.yaml | Provides a composite action to set up the Node.js environment and install dependencies. |
| .github/workflows/deploy.yaml | Implements workflows for diffing and deploying the CDK stacks. |
Comments suppressed due to low confidence (1)
src/app-stage.ts:17
- If core or related stacks depend on resources from GitHubDeploy, consider explicitly adding dependencies (using addDependency) between them to enforce the correct deployment order.
if (appStage === 'prod') {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a GitHub Actions-based deployment pipeline for AWS CDK, along with supporting changes to the infrastructure code and development environment configuration. The most important changes include adding workflows for deployment, creating a new
GitHubDeploystack for permissions management, and updating the application stage to conditionally include the deployment stack in production.Deployment Pipeline Setup:
.github/workflows/deploy.yaml: Added a new GitHub Actions workflow to automate the deployment of CDK stacks. This includes adiffjob to preview changes and adeployjob to apply them to the production environment..github/workflows/prepare.yaml: Added a reusable composite action to set up the Node.js environment, installpnpm, and install project dependencies.Infrastructure Code Updates:
src/deploy/github-deploy.stack.ts: Introduced a newGitHubDeploystack to manage AWS IAM roles and permissions required for GitHub Actions to deploy CDK stacks. This includes policies for CloudFormation, S3, ECR, and SSM.src/app-stage.ts: Updated theAppStageclass to include theGitHubDeploystack in the production environment. Added dependencies between stacks to ensure proper deployment order. [1] [2]Development Environment Configuration:
.vscode/settings.json: Configured Prettier as the default formatter for GitHub Actions workflow files to ensure consistent formatting.