Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality Gate not set for the project. Please configure the Quality Gate in SonarQube or remove sonarqube-quality-gate action from the workflow. #7

Closed
akhil-intellect opened this issue Jun 28, 2021 · 2 comments

Comments

@akhil-intellect
Copy link

i am keep on getting this error in al my profile , quality gateway is enabled in my profile

Screen Shot 2021-06-28 at 2 38 59 PM

@pbrzozowski-equinix
Copy link

pbrzozowski-equinix commented Aug 13, 2021

I face the same issue. It always falls back to this message. I found out that it happens, because all the Sonar urls in the output file (report-task.txt) produced by my SonarQube have http:// addresses instead of https://. Then sonar have HTTP to HTTPS redirection.

Curl used in the script of this GitHub Action by default is not supporting redirections. So the script basically is not getting any data. If you can add --location flag to all curl executions it would follow HTTP to HTTPS redirection.

Workaround for users might be to edit report-task.txt before using Quality Gate check action. You need to replace all the http: occurances to https:
Solution that I just used:

  - name: Create report-task-https.txt with changed urls
    run:  sed -i s/http\:/https\:/g build/sonar/report-task.txt

Example together with SonarQube Quality Gate check:

  - name: Create report-task-https.txt with changed urls
    run:  sed -i s/http\:/https\:/g build/sonar/report-task.txt
  - name: SonarQube Quality Gate check
    uses: sonarsource/sonarqube-quality-gate-action@master
    timeout-minutes: 5
    env:
      SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
    with:
      scanMetadataReportFile: build/sonar/report-task.txt

@tobias-trabelsi-sonarsource

Hello there,

i have created https://jira.sonarsource.com/browse/SONAR-16063 to track and tackle this in the future. thanks for the report.

feel free to reach out in our community forum if you continue having issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants