Skip to content

Commit 951a67c

Browse files
authored
VED-1064 Add more strict constraints to quality checks pipeline (#1236)
1 parent 3b9ed3b commit 951a67c

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/continuous-deployment.yml

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

88
jobs:
9+
run-quality-checks:
10+
uses: ./.github/workflows/quality-checks.yml
11+
secrets:
12+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13+
914
deploy-internal-dev-backend:
15+
needs: [run-quality-checks]
1016
uses: ./.github/workflows/deploy-backend.yml
1117
with:
1218
apigee_environment: internal-dev

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
12+
run-quality-checks:
13+
uses: ./.github/workflows/quality-checks.yml
14+
secrets:
15+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16+
817
deploy-pr-backend:
18+
needs: [run-quality-checks]
919
uses: ./.github/workflows/deploy-backend.yml
1020
with:
1121
apigee_environment: internal-dev

.github/workflows/quality-checks.yml

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

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

109
env:
1110
SHARED_PATH: ${{ github.workspace }}/lambdas/shared
@@ -249,5 +248,5 @@ jobs:
249248
- name: SonarCloud Scan
250249
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9
251250
env:
252-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
251+
GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
253252
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)