Procházet zdrojové kódy

WIP sonar

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer před 2 roky
rodič
revize
f773d7dccd
1 změnil soubory, kde provedl 26 přidání a 26 odebrání
  1. 26 26
      .github/workflows/sonar.yaml

+ 26 - 26
.github/workflows/sonar.yaml

@@ -7,7 +7,7 @@ on:
       - completed
 
 jobs: 
-  submit-to-sonarqube:
+  submit-to-sonarcloud:
     needs: backend
     name: Submit to sonar
     runs-on: ubuntu-latest
@@ -26,7 +26,7 @@ jobs:
       - name: copy output file
         shell: bash
         run: mv /tmp/coverage.out/coverage.out coverage.out
-      - uses: sonarsource/sonarqube-scan-action@master
+      - uses: sonarsource/sonarcloud-github-action@master
         env:
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -38,27 +38,27 @@ jobs:
         with:
             path: .scannerwork
             name: report-${{ env.BRANCH_NAME }}-${{ github.sha }}
-  code-quality-gate:  
-      needs: submit-to-sonarqube
-      name: Code Quality Gate
-      if: github.ref != 'refs/heads/develop'
-      runs-on: ubuntu-latest
-      steps: 
-        - name: Get branch name 
-          shell: bash
-          run: echo "BRANCH_NAME=$(echo ${GITHUB_REF} | tr / -)" >> $GITHUB_ENV
-        - name: Restore report file
-          uses: actions/download-artifact@v3
-          with:
-            path: /tmp/.scannerwork
-            name: report-${{ env.BRANCH_NAME }}-${{ github.sha }}
-        - name: copy output file
-          shell: bash
-          run: mv /tmp/.scannerwork .scannerwork
-        - uses: sonarsource/sonarqube-quality-gate-action@master
-          timeout-minutes: 5
-          env:
-            SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-        - uses: geekyeggo/delete-artifact@v2
-          with:
-            name: report-${{ env.BRANCH_NAME }}-${{ github.sha }}      
+  # code-quality-gate:  
+  #     needs: submit-to-sonarqube
+  #     name: Code Quality Gate
+  #     if: github.ref != 'refs/heads/develop'
+  #     runs-on: ubuntu-latest
+  #     steps: 
+  #       - name: Get branch name 
+  #         shell: bash
+  #         run: echo "BRANCH_NAME=$(echo ${GITHUB_REF} | tr / -)" >> $GITHUB_ENV
+  #       - name: Restore report file
+  #         uses: actions/download-artifact@v3
+  #         with:
+  #           path: /tmp/.scannerwork
+  #           name: report-${{ env.BRANCH_NAME }}-${{ github.sha }}
+  #       - name: copy output file
+  #         shell: bash
+  #         run: mv /tmp/.scannerwork .scannerwork
+  #       - uses: sonarsource/sonarqube-quality-gate-action@master
+  #         timeout-minutes: 5
+  #         env:
+  #           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+  #       - uses: geekyeggo/delete-artifact@v2
+  #         with:
+  #           name: report-${{ env.BRANCH_NAME }}-${{ github.sha }}