Update car-demo-updated-pipeline.yml #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
mvn clean verify sonar:sonar | |
cd .. | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |