Skip to content

Commit d67a842

Browse files
committed
testing app
1 parent 0fe8279 commit d67a842

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
python_version: '${{ needs.metadata.outputs.python_version }}'
7272
terraform_version: '${{ needs.metadata.outputs.terraform_version }}'
7373
version: '${{ needs.metadata.outputs.version }}'
74+
commit_sha: '${{ github.event.pull_request.head.sha }}'
7475
secrets: inherit
7576
deploy-stage:
7677
if: contains(github.event.pull_request.labels.*.name, 'deploy')

.github/workflows/cicd-2-main-branch.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
python_version: '${{ needs.metadata.outputs.python_version }}'
7777
terraform_version: '${{ needs.metadata.outputs.terraform_version }}'
7878
version: '${{ needs.metadata.outputs.version }}'
79+
commit_sha: '${{ github.sha }}'
7980
secrets: inherit
8081

8182
deploy-stage:

.github/workflows/stage-3-build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ on:
3131
description: 'Version of the software, set by the CI/CD pipeline workflow'
3232
required: true
3333
type: string
34+
commit_sha:
35+
description: 'commit sha of the docker image'
36+
required: true
37+
type: string
38+
3439

3540
env:
3641
REGISTRY: ghcr.io
@@ -78,6 +83,8 @@ jobs:
7883
push: true
7984
tags: ${{ steps.meta.outputs.tags }}
8085
labels: ${{ steps.meta.outputs.labels }}
86+
build-args:
87+
- commit_sha: ${{ github.event.pull_request.head.sha }}
8188

8289
- name: Generate artifact attestation
8390
uses: actions/attest-build-provenance@v3

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ COPY --chown=${CONTAINER_USER}:${CONTAINER_GROUP} ./manage_breast_screening /app
6363
COPY --from=node_builder --chown=${CONTAINER_USER}:${CONTAINER_GROUP} /app/manage_breast_screening/assets/compiled /app/manage_breast_screening/assets/compiled
6464
COPY --chown=${CONTAINER_USER}:${CONTAINER_GROUP} manage.py ./
6565

66+
ARG COMMIT_SHA
67+
ENV COMMIT_SHA=$COMMIT_SHA
68+
6669
# Run django commands
6770
ENV DEBUG=0
6871
RUN python ./manage.py collectstatic --noinput

manage_breast_screening/clinics/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
name="index_completed",
2323
kwargs={"filter": "completed"},
2424
),
25+
path("sha/", "this-is-a-test", name="get_current_sha"),
2526
path("all/", views.clinic_list, name="index_all", kwargs={"filter": "all"}),
2627
# Clinic show
2728
path("<uuid:pk>/", views.clinic, name="show"),

0 commit comments

Comments
 (0)