Test IaC @ codeartifactdoco #7
Workflow file for this run
This file contains 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
name: CodeArtifact - Build | |
run-name: Test IaC @ ${{ github.ref_name }} | |
on: | |
push: | |
paths: | |
- .github/workflows/codeartifact-build.yml | |
- CodeArtifact/cdk/** | |
workflow_dispatch: | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
central-stack: | |
name: Test central resources IaC | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: CodeArtifact/cdk/central_resources | |
env: | |
ENV_STAGE: dev | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make lint-python | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Set up aws-cdk | |
run: make install-cdk | |
- name: Print deployment environment | |
run: | | |
echo "INFO: cdk version: $(cdk --version)" | |
echo "INFO: node version: $(node --version)" | |
echo "INFO: npm version: $(npm --version)" | |
echo "INFO: python3 version: $(python3 --version)" | |
- name: Run cdk synth | |
run: make synth | |
- name: Run cdk-validator-cfnguard | |
env: | |
ENV: ${{ needs.common.outputs.environment }} | |
run: | | |
make test-with-cdk-validator-cfnguard | |
account-stack: | |
name: Test account-specific resources IaC | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: CodeArtifact/cdk/account_resources | |
env: | |
ENV_STAGE: dev | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make lint-python | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Set up aws-cdk | |
run: make install-cdk | |
- name: Print deployment environment | |
run: | | |
echo "INFO: cdk version: $(cdk --version)" | |
echo "INFO: node version: $(node --version)" | |
echo "INFO: npm version: $(npm --version)" | |
echo "INFO: python3 version: $(python3 --version)" | |
- name: Run cdk synth | |
run: make synth |