Skip to content

Commit 0ddfcaf

Browse files
Add infra for Catala app (#264)
* app-catala: Install `template-infra:app` at version 0.16.0.post21.dev0+3af6525 * Add infra for catala app and use port 3400 * Disable database * Add backends for build repo and service * Use updated docker image * latest version * Update latest and add grype exceptions * Add .dockleignore for python base image not clearing cache * Remove build folders * Revert app changes * Make simple API test * Add custom domain for app-catala in dev * Remove app specific exceptions applied at the project level * app-catala: Update `template-infra:app` to version 0.16.0.post21.dev0+3af6525
1 parent 2d0290e commit 0ddfcaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1540
-5
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy app-catala
2+
# Need to set a default value for when the workflow is triggered from a git push
3+
# which bypasses the default configuration for inputs
4+
run-name: Deploy ${{inputs.version || 'main' }} to app-catala ${{ inputs.environment || 'dev' }}
5+
6+
on:
7+
push:
8+
branches:
9+
- "main"
10+
paths:
11+
- "app-catala/**"
12+
- "bin/**"
13+
- "infra/**"
14+
workflow_dispatch:
15+
inputs:
16+
environment:
17+
description: Environment to deploy to
18+
required: true
19+
default: "dev"
20+
type: choice
21+
options:
22+
- dev
23+
- staging
24+
- prod
25+
version:
26+
required: true
27+
default: "main"
28+
description: Tag or branch or SHA to deploy
29+
30+
jobs:
31+
deploy:
32+
name: " " # GitHub UI is noisy when calling reusable workflows, so use whitespace for name to reduce noise
33+
uses: ./.github/workflows/deploy.yml
34+
with:
35+
app_name: "app-catala"
36+
environment: ${{ inputs.environment || 'dev' }}
37+
version: ${{ inputs.version || 'main' }}
38+
secrets: inherit
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI Infra Service Checks - app-catala
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- infra/app-catala/service/**
9+
- infra/modules/**
10+
- infra/test/**
11+
- .github/workflows/ci-app-catala-infra-service.yml
12+
pull_request:
13+
paths:
14+
- infra/app-catala/service/**
15+
- infra/modules/**
16+
- infra/test/**
17+
- .github/workflows/ci-app-catala-infra-service.yml
18+
workflow_dispatch:
19+
inputs:
20+
version:
21+
required: true
22+
default: "main"
23+
description: Tag or branch or SHA to test
24+
25+
jobs:
26+
build-and-publish:
27+
name: Build
28+
uses: ./.github/workflows/build-and-publish.yml
29+
with:
30+
app_name: app-catala
31+
ref: ${{ inputs.version || github.ref }}
32+
33+
infra-test-e2e:
34+
name: Test service
35+
runs-on: ubuntu-latest
36+
needs: [build-and-publish]
37+
38+
permissions:
39+
contents: read
40+
id-token: write
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
with:
45+
ref: ${{ inputs.version || github.ref }}
46+
47+
- name: Set up Terraform
48+
uses: ./.github/actions/setup-terraform
49+
50+
- uses: actions/setup-go@v5
51+
with:
52+
go-version-file: "infra/test/go.mod"
53+
54+
- name: Configure AWS credentials
55+
uses: ./.github/actions/configure-aws-credentials
56+
with:
57+
app_name: app-catala
58+
# Run infra CI on dev environment
59+
environment: dev
60+
61+
- name: Run Terratest
62+
run: make infra-test-service APP_NAME=app-catala
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI app-catala PR Environment Checks
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
pr_number:
6+
required: true
7+
type: string
8+
commit_hash:
9+
required: true
10+
type: string
11+
pull_request:
12+
13+
jobs:
14+
update:
15+
name: " " # GitHub UI is noisy when calling reusable workflows, so use whitespace for name to reduce noise
16+
uses: ./.github/workflows/pr-environment-checks.yml
17+
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.state == 'open'
18+
with:
19+
app_name: "app-catala"
20+
environment: "dev"
21+
pr_number: ${{ inputs.pr_number || github.event.number }}
22+
commit_hash: ${{ inputs.commit_hash || github.event.pull_request.head.sha }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI app-catala PR Environment Destroy
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
pr_number:
6+
required: true
7+
type: string
8+
pull_request_target:
9+
types: [closed]
10+
11+
jobs:
12+
destroy:
13+
name: " " # GitHub UI is noisy when calling reusable workflows, so use whitespace for name to reduce noise
14+
uses: ./.github/workflows/pr-environment-destroy.yml
15+
with:
16+
app_name: "app-catala"
17+
environment: "dev"
18+
pr_number: ${{ inputs.pr_number || github.event.number }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI Vulnerability Scans - app-catala
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- app-catala/**
9+
- .grype.yml
10+
- .hadolint.yaml
11+
- .trivyignore
12+
- .github/workflows/vulnerability-scans.yml
13+
- .github/workflows/ci-app-catala-vulnerability-scans.yml
14+
pull_request:
15+
paths:
16+
- app-catala/**
17+
- .grype.yml
18+
- .hadolint.yaml
19+
- .trivyignore
20+
- .github/workflows/vulnerability-scans.yml
21+
- .github/workflows/ci-app-catala-vulnerability-scans.yml
22+
23+
jobs:
24+
vulnerability-scans:
25+
name: Vulnerability Scans
26+
uses: ./.github/workflows/vulnerability-scans.yml
27+
with:
28+
app_name: "app-catala"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
22
_commit: 4f60dcd
33
_src_path: https://github.com/navapbc/strata-template-rules-engine-catala
4-
app_local_port: 3001
4+
app_local_port: 3400
55
app_name: app-catala

.template-infra/app-app-catala.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: v0.16.0-21-g3af6525
3+
_src_path: https://github.com/navapbc/template-infra
4+
app_has_dev_env_setup: true
5+
app_local_port: 3400
6+
app_name: app-catala
7+
template: app

app-catala/.dockleignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore apt-get cache not being cleared in python base image
2+
DKL-DI-0005

app-catala/.grype.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ignore:
2+
# These settings ignore any findings that fall into these categories
3+
- fix-state: not-fixed
4+
- fix-state: wont-fix
5+
- fix-state: unknown
6+
7+
# We dont use imaplib
8+
- vulnerability: CVE-2025-15366
9+
# We dont use poplib
10+
- vulnerability: CVE-2025-15367

app-catala/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- PY_RUN_APPROACH=local
1616
- PYTHONPATH=/app/
1717
ports:
18-
- 3001:3001
18+
- 3400:3400
1919
volumes:
2020
- ./:/app/
2121
- /app/.venv

0 commit comments

Comments
 (0)