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

AAE-28943 Create sonar scan action #840

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/actions/sonar-scanner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Sonar Scanner'
description: 'Run Sonar Scanner to load JaCoCo report on SonarCloud'
inputs:
sonar-token:
description: 'SonarCloud token'
required: true
aggregate-report-path:
description: 'Path of the aggregated JaCoCo report'
required: true
project-key:
description: 'SonarCloud project key'
required: true
sonar-host-url:
description: 'SonarCloud host url'
required: false
default: 'https://sonarcloud.io'
sonar-organization:
description: 'SonarCloud organization'
required: false
default: 'alfresco'


runs:
using: composite
steps:
- name: Load JaCoCo report on SonarCloud
env:
SONAR_TOKEN: ${{ inputs.sonar-token }}
shell: bash
run: |
mvn sonar:sonar -Dsonar.host.url=${{ inputs.sonar-host-url }} -Dsonar.organization=${{ inputs.sonar-organization }} -Dsonar.projectKey=${{ inputs.project-key }} -Dsonar.coverage.jacoco.xmlReportPaths=${{ inputs.aggregate-report-path }}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,14 @@ updates:
catch-all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/actions/sonar-scanner"
schedule:
interval: "weekly"
groups:
catch-all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/actions/update-deployment-runtime-versions"
schedule:
Expand Down
16 changes: 16 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Here follows the list of GitHub Actions topics available in the current document
- [setup-terraform-docs](#setup-terraform-docs)
- [setup-updatebot](#setup-updatebot)
- [slack-file-upload](#slack-file-upload)
- [sonar-scanner](#sonar-scanner)
- [update-deployment-runtime-versions](#update-deployment-runtime-versions)
- [update-pom-to-next-pre-release](#update-pom-to-next-pre-release)
- [update-project-base-tag](#update-project-base-tag)
Expand Down Expand Up @@ -1654,6 +1655,21 @@ Uploads a file to a Slack channel.
file-title: 'file description' # optional
```

### sonar-scanner

Run Sonar Scanner to load JaCoCo report on SonarCloud.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/sonar-scanner@ref
with:
sonar-token: ${{ secrets.SONAR_TOKEN }}
aggregate-report-path: ${{ github.workspace }}/coverage-folder/target/site/jacoco-aggregate/jacoco.xml
project-key: sonar-project-key

```

sonar-host-url and sonar-organization are optional inputs. If not provided, the default values will be used.

### update-deployment-runtime-versions

For more information, see [update-deployment-runtime-versions](../.github/actions/update-deployment-runtime-versions/action.yml).
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.6.3
v8.7.0
Loading