Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions .github/workflows/auto-approve.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 18 additions & 8 deletions .github/workflows/cdk-deploy-dev.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 18 additions & 8 deletions .github/workflows/cdk-deploy-test.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions .github/workflows/cdk-validate.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 34 additions & 7 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 24 additions & 6 deletions .projenrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
from projen import YamlFile
from projen.awscdk import AwsCdkPythonApp

from src.bin.cicd_helper import github_cicd
from src.bin.cicd_helper import (
GITHUB_ACTIONS,
cdk_validate_workflow,
github_cicd,
pin_github_actions,
)
from src.bin.env_helper import CDK_VALIDATE_COMMAND, cdk_action_task

# Define the python module name and set the python version
Expand All @@ -17,8 +22,8 @@
python_version = "3.13"
python_major, python_minor = map(int, python_version.split("."))
python_requires = f">={python_version},<{python_major}.{python_minor + 1}"
cdk_version = "2.263.0"
cdk_cli_version = "2.1130.0"
cdk_version = "2.267.0"
cdk_cli_version = "2.1139.0"

# Define the AWS region for the CDK app and github workflows
# Default to us-east-1 if AWS_REGION is not set in your environment variables
Expand All @@ -43,11 +48,11 @@
app_entrypoint=f"{python_module_name}/app.py",
deps=["aws-cdk-github-oidc"],
dev_deps=[
"projen@0.101.11",
"projen@0.103.7",
"ruff",
"ty",
], # Find the latest projen version here: https://pypi.org/project/projen/
pytest_options={"version": "9.0.3"},
pytest_options={"version": "9.1.1"},
uv=True,
uv_options={
"python_exec": f"python{python_version}",
Expand Down Expand Up @@ -97,6 +102,9 @@
# so the CDK CLI knows which region to use
project.tasks.add_environment("CDK_DEFAULT_REGION", aws_region)

# Tests import the stacks the same way src/app.py does, so put src on the module path
project.test_task.env("PYTHONPATH", python_module_name)

project.add_task(
"validate",
description="Validate the CDK app offline against the default CloudFormation rules",
Expand All @@ -114,6 +122,12 @@

gh = project.github

# Keep projen-managed workflows (auto-approve, pull-request-lint) on the same action versions
pin_github_actions(gh)

# Validate the CDK app offline on every pull request (no AWS credentials required)
cdk_validate_workflow(gh, python_version, cdk_cli_version)

# Add Dependabot configuration for uv
YamlFile(
project,
Expand Down Expand Up @@ -151,7 +165,11 @@
# Add checkout step before the merge step
auto_approve_workflow.add_override(
"jobs.approve.steps.1",
{"name": "Checkout", "uses": "actions/checkout@v5"},
{
"name": "Checkout",
"uses": GITHUB_ACTIONS["checkout"],
"with": {"persist-credentials": False},
},
)
auto_approve_workflow.add_override(
"jobs.approve.steps.2",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading