Skip to content

Commit

Permalink
chore(sonar): reduce number of files at root dir and add version info…
Browse files Browse the repository at this point in the history
…rmation to sonar
  • Loading branch information
PauloGoncalvesBH committed May 9, 2024
1 parent 741f322 commit 6aed7d0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/common_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Download unit test artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -184,13 +185,27 @@ jobs:
path: coverage-integration
- name: Merge coverage report
run: npm run merge-lcov
- name: Get the project current version
id: currentversion
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: Load secrets from 1password
uses: 1password/load-secrets-action@v2
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SONAR_TOKEN: op://CI-CD/sonar/SONAR_TOKEN
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=serverest
-Dsonar.projectKey=ServeRest
-Dsonar.projectName=ServeRest
-Dsonar.projectVersion=${{ steps.currentversion.outputs.tag }}
-Dsonar.sources=src/
-Dsonar.javascript.lcov.reportPaths=lcov.info
-Dsonar.sourceEncoding=UTF-8
-Dsonar.exclusions=docs/**,test/**,.husky/**,.github/**,coverage-*/**,.nyc_output/**,reports/**,src/server.js,src/utils/localMonitor.js,src/utils/ambiente.js
-Dsonar.tests=test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-online-serverest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ jobs:
id: gcloud_revision
run: |
PENULTIMATE_REVISION=$(gcloud run revisions list --service $SERVICE_PRODUCTION --region $REGION --format="value(metadata.name)" --limit=2 | tail -n 1)
echo "::set-output name=penultimate::$PENULTIMATE_REVISION"
echo "penultimate=$PENULTIMATE_REVISION" >> $GITHUB_OUTPUT
- name: Update production traffic to penultimate revision
run: |
gcloud run \
Expand Down
9 changes: 0 additions & 9 deletions sonar-project.properties

This file was deleted.

0 comments on commit 6aed7d0

Please sign in to comment.