Skip to content

Commit b65cbdc

Browse files
committed
Add constraints and failing scenario
1 parent de80070 commit b65cbdc

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/continuous-deployment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ on:
66
- master
77

88
jobs:
9+
run-quality-checks:
10+
uses: ./.github/workflows/quality-checks.yml
11+
secrets:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
14+
915
deploy-internal-dev-backend:
16+
needs: [run-quality-checks]
1017
uses: ./.github/workflows/deploy-backend.yml
1118
with:
1219
apigee_environment: internal-dev

.github/workflows/pr-deploy-and-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ on:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8+
# TODO - discuss with team whether we want this constraint on PRs. My gut feel is no, but not just up to me!
9+
run-quality-checks:
10+
uses: ./.github/workflows/quality-checks.yml
11+
secrets:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
14+
815
deploy-pr-backend:
16+
needs: [run-quality-checks]
917
uses: ./.github/workflows/deploy-backend.yml
1018
with:
1119
apigee_environment: internal-dev

.github/workflows/quality-checks.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Quality Checks
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
types: [labeled, opened, synchronize, reopened, unlabeled]
4+
# pull_request:
5+
# types: [opened, synchronize, reopened]
6+
workflow_call:
7+
secrets:
8+
GITHUB_TOKEN:
9+
required: true
10+
SONAR_TOKEN:
11+
required: true
912

1013
env:
1114
SHARED_PATH: ${{ github.workspace }}/lambdas/shared

lambdas/filenameprocessor/src/file_name_processor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ def handle_batch_file(
212212
error_details=str(error),
213213
)
214214

215+
# make a bad change to check quality checks job blocks deployment
216+
chicken_nugget
217+
215218
# Create ack file
216219
make_and_upload_ack_file(message_id, file_key, False, False, created_at_formatted_string)
217220

0 commit comments

Comments
 (0)