-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.58 KB
/
car-demo-updated-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: GCP Pipeline
on:
push:
branches: [ main ]
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: "19"
- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: |
~/.sonar/cache
~/.sonar/cache-*
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run SonarCloud for Each Repository
run: |
cat projects-changes-deploy.txt | while read repo; do
echo "Processing repository: $repo"
#cd $repo
#car-demo/$repo || exit 1
#mvn clean verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=nashtech -Dsonar.projectKey=$repo -Dsonar.branch.name=main -Dsonar.login=${{ secrets.SONAR_TOKEN }} -X
#mvn clean verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=nashtech
mvn -f car-demo/$repo clean verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=nashtech -Dsonar.projectKey=$repo -Dsonar.branch.name=main -Dsonar.login=${{ secrets.SONAR_TOKEN }} -X
done
#cd ..
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}