Skip to content

Commit 1e30f0c

Browse files
committed
CCM-11938: Fix sonar issues
1 parent abbd531 commit 1e30f0c

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

.github/actions/build-proxies/action.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,28 @@ runs:
7171
7272
- name: Build ${{ inputs.apimEnv }} oas
7373
working-directory: .
74+
env:
75+
APIM_ENV: ${{ inputs.apimEnv }}
7476
shell: bash
7577
run: |
76-
if [ ${{ inputs.apimEnv }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
78+
if [ ${{ env.APIM_ENV }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
7779
then
7880
echo "Building sandbox OAS spec"
7981
make build-json-oas-spec APIM_ENV=sandbox
8082
else
8183
echo "Building env specific OAS spec"
82-
make build-json-oas-spec APIM_ENV=${{ inputs.apimEnv }}
84+
make build-json-oas-spec APIM_ENV=${{ env.APIM_ENV }}
85+
fi
86+
if [[ $APIM_ENV == *-pr ]]; then
87+
echo "Removing pr suffix from APIM_ENV after building OAS and calling proxygen"
88+
APIM_ENV=$(echo "$APIM_ENV" | sed 's/-pr$//')
89+
echo "APIM_ENV=$APIM_ENV" >> $GITHUB_ENV
8390
fi
8491
8592
- name: Upload OAS Spec
8693
uses: actions/upload-artifact@v4
8794
with:
88-
name: ${{ inputs.apimEnv }}-build-output
95+
name: ${{ env.APIM_ENV }}-build-output
8996
path: ./build
9097

9198
- name: Trigger deploy proxy
@@ -101,7 +108,7 @@ runs:
101108
--targetEnvironment "${{ inputs.environment }}" \
102109
--runId "${{ inputs.runId }}" \
103110
--buildSandbox ${{ inputs.buildSandbox }} \
104-
--apimEnvironment "${{ inputs.apimEnv }}" \
111+
--apimEnvironment "${{ env.APIM_ENV }}" \
105112
--boundedContext "notify-supplier" \
106113
--targetDomain "$TARGET_DOMAIN" \
107114
--version "${{ inputs.version }}"

.github/workflows/manual-proxy-environment-deploy.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,7 @@ jobs:
6767
6868
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
6969
echo "APIM_ENV=$APIM_ENV" >> $GITHUB_ENV
70-
- name: Build environment oas
71-
working-directory: .
72-
env:
73-
APIM_ENV: ${{ env.APIM_ENV }}
74-
shell: bash
75-
run: |
76-
make build-json-oas-spec APIM_ENV=$APIM_ENV
77-
if [[ $APIM_ENV == *-pr ]]; then
78-
echo "Removing pr suffix from APIM_ENV after building OAS and calling proxygen"
79-
APIM_ENV=$(echo "$APIM_ENV" | sed 's/-pr$//')
80-
echo "APIM_ENV=$APIM_ENV" >> $GITHUB_ENV
81-
fi
70+
8271
- name: "Build proxies"
8372
env:
8473
PROXYGEN_API_NAME: nhs-notify-supplier

scripts/config/sonar-scanner.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
sonar.host.url=https://sonarcloud.io
44
sonar.qualitygate.wait=true
55
sonar.sourceEncoding=UTF-8
6-
sonar.sources=lambdas/example-lambda
7-
sonar.tests=tests/, lambdas/example-lambda/src/__tests__
6+
sonar.sources=lambdas/api-handler/src, lambdas/authorizer/src
7+
sonar.tests=tests/, lambdas/authorizer/src/__tests__
88
sonar.exclusions=lambdas/*/src/__tests__/**/*
99
sonar.terraform.provider.aws.version=5.54.1
1010
sonar.cpd.exclusions=**.test.*

0 commit comments

Comments
 (0)