Skip to content

Commit a283dbb

Browse files
committed
soanrqube integration 3
1 parent 1271ec3 commit a283dbb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/CI.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,18 @@ jobs:
4343
tags: ${{ secrets.DOCKERHUB_USERNAME }}/web:latest
4444

4545
# Step 6: Set up SonarQube scanner
46-
- name: Set up SonarQube scanner
47-
uses: sonarsource/sonarcloud-github-action@master
48-
with:
49-
sonar-token: ${{ secrets.SONAR_TOKEN }} # Secret token from SonarQube
50-
sonar-project-key: "Microservice-Based-Password-Manager-with-a-Secure-CI-CD-Pipeline" # Your project key
51-
sonar-project-name: "Microservice-Based-Password-Manager" # Your project name
52-
sonar.host.url: ${{ secrets.SONAR_HOST_URL }} # SonarQube server URL from secrets
46+
- name: Run SonarQube analysis
47+
env:
48+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Secret token from SonarQube
49+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # SonarQube server URL from secrets
50+
SONAR_PROJECT_KEY: "Microservice-Based-Password-Manager-with-a-Secure-CI-CD-Pipeline" # Your project key
51+
SONAR_PROJECT_NAME: "Microservice-Based-Password-Manager" # Your project name
52+
run: |
53+
# Download the SonarQube scanner (or use a preinstalled version)
54+
wget -qO- https://github.com/SonarSource/sonar-scanner-cli/releases/download/4.6.2.2472/sonar-scanner-cli-4.6.2.2472-linux.zip | unzip -d /opt/sonar-scanner -
55+
export SONAR_SCANNER_HOME=/opt/sonar-scanner/sonar-scanner-4.6.2.2472
56+
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
57+
sonar-scanner
5358
5459
# Step 7: Check Docker Compose version (optional check for Compose functionality)
5560
- name: Check out Docker Compose version

0 commit comments

Comments
 (0)