File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarQube Scan
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ sonar :
11+ name : Build and Analyze
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up JDK 17
19+ uses : actions/setup-java@v4
20+ with :
21+ java-version : ' 17'
22+ distribution : ' temurin'
23+
24+ - name : Cache Maven packages
25+ uses : actions/cache@v4
26+ with :
27+ path : ~/.m2
28+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29+ restore-keys : ${{ runner.os }}-m2
30+
31+ - name : Build and SonarQube Scan
32+ run : |
33+ mvn clean verify sonar:sonar \
34+ -Dsonar.projectKey=Nglicloud_Java \
35+ -Dsonar.host.url= https://sonarcloud.io/projects \
36+ -Dsonar.login=75f5d23fd39669ae77ea05ba90a303606672ef5a \
37+ -Dsonar.organization=nglicloud
You can’t perform that action at this time.
0 commit comments