From 1c6fd20a43d20f3da57751db2992214a67048ced Mon Sep 17 00:00:00 2001 From: marcello33 Date: Thu, 9 Feb 2023 10:04:40 +0100 Subject: [PATCH] dev: chg: POS-215 move sonarqube to own ci (#153) --- .github/workflows/security-ci.yml | 26 ----------------- .github/workflows/security-sonarqube-ci.yml | 32 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/security-sonarqube-ci.yml diff --git a/.github/workflows/security-ci.yml b/.github/workflows/security-ci.yml index 7f4f0a13..edb0df5d 100644 --- a/.github/workflows/security-ci.yml +++ b/.github/workflows/security-ci.yml @@ -39,29 +39,3 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: snyk.sarif - - sonarqube: - name: SonarQube - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - # Disabling shallow clone is recommended for improving relevancy of reporting. - fetch-depth: 0 - - # Triggering SonarQube analysis as results of it are required by Quality Gate check. - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - # Check the Quality Gate status. - - name: SonarQube Quality Gate check - id: sonarqube-quality-gate-check - uses: sonarsource/sonarqube-quality-gate-action@master - # Force to fail step after specific time. - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/.github/workflows/security-sonarqube-ci.yml b/.github/workflows/security-sonarqube-ci.yml new file mode 100644 index 00000000..68952237 --- /dev/null +++ b/.github/workflows/security-sonarqube-ci.yml @@ -0,0 +1,32 @@ +name: SonarQube CI +on: + push: + branches: + - master + +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting. + fetch-depth: 0 + + # Triggering SonarQube analysis as results of it are required by Quality Gate check. + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + # Check the Quality Gate status. + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@master + # Force to fail step after specific time. + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}