Skip to content

Commit d13f69b

Browse files
Moved sonar to ci-cd pipeline
1 parent ef1d137 commit d13f69b

File tree

2 files changed

+30
-42
lines changed

2 files changed

+30
-42
lines changed

.github/workflows/ci-cd.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,33 @@ jobs:
8585
SOURCE_DIR: ./umd
8686
DEST_DIR: sdk
8787
ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public
88+
89+
- name: SonarQube Scan (Push)
90+
if: github.event_name == 'push'
91+
uses: SonarSource/sonarcloud-github-action@v1.5
92+
env:
93+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
94+
with:
95+
projectBaseDir: .
96+
args: >
97+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
98+
-Dsonar.projectName=${{ github.event.repository.name }}
99+
-Dsonar.projectKey=${{ github.event.repository.name }}
100+
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
101+
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
102+
- name: SonarQube Scan (Pull Request)
103+
if: github.event_name == 'pull_request'
104+
uses: SonarSource/sonarcloud-github-action@v1.5
105+
env:
106+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
107+
with:
108+
projectBaseDir: .
109+
args: >
110+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
111+
-Dsonar.projectName=${{ github.event.repository.name }}
112+
-Dsonar.projectKey=${{ github.event.repository.name }}
113+
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
114+
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
115+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
116+
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
117+
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

sonar-scanner.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)