Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-poreda-sonarsource committed May 14, 2021
1 parent b620d38 commit 69da6d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-tests:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: checkout action
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,15 @@ jobs:
You can change the location of the report metadata file by using the optional `scanMetadataReportFile` input:

```yaml
uses: sonarsource/sonarqube-scan-action@master
uses: sonarsource/sonarqube-quality-gate-action@master
with:
scanMetadataReportFile: target/sonar/report-task.txt
```
### Secrets
### Environment variables
- `SONAR_TOKEN` – **Required** – this token is used to authenticate access to SonarQube. You can read more about security tokens [here](https://docs.sonarqube.org/latest/user-guide/user-token/). You need to set the `SONAR_TOKEN` environment variable in the "Secrets" settings page of your repository.

## Pull request analysis example

<img src="./images/SonarQube-analysis-in-Checks.png">

## Do not use this GitHub action if you are in the following situations

* You want to analyze a .NET solution. Read the documentation about our [Scanner for .NET](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/).
Expand Down
Binary file removed images/SonarQube-analysis-in-Checks.png
Binary file not shown.
2 changes: 1 addition & 1 deletion script/check-quality-gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ status="$(jq -r '.task.status' <<< "$task")"

until [[ ${status} != "PENDING" && ${status} != "IN_PROGRESS" ]]; do
printf '.'
sleep 1
sleep 5s
task="$(curl --silent --fail --show-error --user ${SONAR_TOKEN}: ${ceTaskUrl})"
status="$(jq -r '.task.status' <<< "$task")"
done
Expand Down

0 comments on commit 69da6d5

Please sign in to comment.