diff --git a/.github/workflows/car-demo-pipeline.yml b/.github/workflows/car-demo-pipeline.yml index e9e6ba74..1cdcd428 100644 --- a/.github/workflows/car-demo-pipeline.yml +++ b/.github/workflows/car-demo-pipeline.yml @@ -7,6 +7,23 @@ env: PROJECT_ID: ${{ secrets.GKE_PROJECT }} jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: SonarCloud Scan + working-directory: shipment-service + run: mvn clean verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=nashtech -Dsonar.projectKey=shipment-service + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} setup-build-publish-deploy: runs-on: ubuntu-latest permissions: