Skip to content

Commit

Permalink
chore(sonar): try another sonar report
Browse files Browse the repository at this point in the history
  • Loading branch information
bas-kirill committed Aug 14, 2024
1 parent c7db0cc commit d019e10
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,42 @@ jobs:
MUSE_JWT_SECRET_KEY: ${{ secrets.MUSE_JWT_SECRET_KEY }}
run: (cd ./server && ./gradlew build sonar --info)

sonar-report:
name: "[SERVER] Sonar Report"
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
- uses: DesarrolloORT/sonarqube-quality-gate-action@v1
id: quality-gate-check
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Sonar Quality Gate
uses: dieuhd/sonar-quality-gate@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_URL: "https://api.github.com"
GIT_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT_KEY: "bas-kirill_muse-project_c40bc999-8826-433b-bb84-8871688b1ab1"
with:
login: ${{ secrets.SONAR_TOKEN }}
url: ${{ secrets.SONAR_HOST_URL }}
projectKey: "bas-kirill_muse-project_c40bc999-8826-433b-bb84-8871688b1ab1"
sonar-project-key: "bas-kirill_muse-project_c40bc999-8826-433b-bb84-8871688b1ab1"
sonar-host-url: ${{ secrets.SONAR_HOST_URL }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}

- name: Output result
run: |
echo "${{ steps.quality-gate-check.outputs.project-status }}"
echo "${{ steps.quality-gate-check.outputs.quality-gate-result }}"
# sonar-report:
# name: "[SERVER] Sonar Report"
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout
# uses: actions/[email protected]
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# - name: Set up Sonar Quality Gate
# uses: dieuhd/sonar-quality-gate@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# GIT_URL: "https://api.github.com"
# GIT_TOKEN: ${{ secrets.GH_TOKEN }}
# SONAR_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_PROJECT_KEY: "bas-kirill_muse-project_c40bc999-8826-433b-bb84-8871688b1ab1"
# with:
# login: ${{ secrets.SONAR_TOKEN }}
# url: ${{ secrets.SONAR_HOST_URL }}
# projectKey: "bas-kirill_muse-project_c40bc999-8826-433b-bb84-8871688b1ab1"

server-unit-tests:
name: "[SERVER] Unit Tests"
Expand Down

0 comments on commit d019e10

Please sign in to comment.