mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2025-12-26 23:37:06 +00:00
* TOOLS-23: init * added dependency * test * test * test * added projects * test * maven opts Xss2m * added all projects * test * disabled PR * enabled caching, enabled tip.jfrog proxy * fix path * sequential check * test2 * test3 * test4 * test5 * test6 * test * test * trigger 500 Internal Server Error * trigger * trigger * test * added sonar.pullrequest.branch * sonar.pullrequest.key * master branch * added dispatch event * fix maven user for jfrog * newline Co-authored-by: Eugene Taranov <eugene@taranov.me>
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
name: Run sonar analysis
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types: [ matrix-sonar ]
|
|
|
|
env:
|
|
SONAR_URL: https://sonarcloud.io
|
|
SONAR_ORGANIZATION: telecominfraproject
|
|
MAVEN_OPTS: -Xmx3g -Xss2m # prevents java.lang.StackOverflowError
|
|
|
|
jobs:
|
|
sonar:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: wlan-cloud-services
|
|
ref: master
|
|
fetch-depth: 0
|
|
- name: Checkout dependency Telecominfraproject/wlan-cloud-root
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: Telecominfraproject/wlan-cloud-root
|
|
path: wlan-cloud-root
|
|
fetch-depth: 0
|
|
- name: Set up JDK 14
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 14
|
|
- name: Cache Maven packages
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.m2/repository/
|
|
key: ${{ runner.os }}-m2
|
|
- name: Configure maven settings.xml
|
|
run: cp wlan-cloud-services/.github/workflows/maven_settings_template.xml /home/runner/.m2/settings.xml
|
|
- name: Maven build
|
|
working-directory: wlan-cloud-services/${{ github.event.client_payload.project }}
|
|
env:
|
|
MAVEN_REPO_USERNAME: build-pipeline
|
|
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: mvn clean install
|
|
- name: Run sonar analysis for ${{ github.event.client_payload.project }}
|
|
working-directory: wlan-cloud-services/${{ github.event.client_payload.project }}
|
|
env:
|
|
MAVEN_REPO_USERNAME: build-pipeline
|
|
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: mvn sonar:sonar -Dsonar.host.url=${{ env.SONAR_URL }} -Dsonar.login=${{ secrets.SONAR_LOGIN }} -Dsonar.organization=${{ env.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ github.event.client_payload.project }}
|
|
|