Skip to content

Commit

Permalink
add sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
jdettmannnava committed Dec 13, 2024
1 parent b8f6323 commit 170d0c3
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,32 @@ on:
- .github/workflows/deploy.yml

jobs:
first_thing:
runs-on: ubuntu-latest
sonar-quality-gate:
name: Sonarqube Quality Gate
runs-on: self-hosted
env:
# Workaround until https://jira.cms.gov/browse/PLT-338 is implemented.
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: "true"
steps:
- run: echo 'works'

- name: "Checkout code"
uses: actions/checkout@v4
- name: 'List directory'
run: ls
- name: Set env vars from AWS params
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main
env:
AWS_REGION: ${{ vars.AWS_REGION }}
with:
params: |
SONAR_HOST_URL=/sonarqube/url
SONAR_TOKEN=/sonarqube/token
- name: Run quality gate scan
uses: sonarsource/sonarqube-scan-action@master
with:
args:
-Dsonar.projectKey=bcda-dpc-static-site
-Dsonar.sources=.
-Dsonar.working.directory=./sonar_workspace
-Dsonar.branch.name=${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
-Dsonar.projectVersion=${{ github.ref_name == 'main' && github.sha || 'branch' }}
-Dsonar.qualitygate.wait=true

0 comments on commit 170d0c3

Please sign in to comment.