Commit 937f3f69 authored by Khalid Ali's avatar Khalid Ali
Browse files

Update sonarqube command

parent 3b58ce7a
image: java:8 image: java:8
before_script: before_script:
- wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.5.zip
- ./sonarqube-7.5/bin/linux-x86-64/sonar.sh console &
- apt-get update -qq && apt-get install -y -qq git - apt-get update -qq && apt-get install -y -qq git
- git config --global user.email "kali21@masonlive.gmu.edu" - git config --global user.email "kali21@masonlive.gmu.edu"
- git config --global user.name "Khalid Ali" - git config --global user.name "Khalid Ali"
...@@ -12,7 +10,7 @@ sonarqube_master_job: ...@@ -12,7 +10,7 @@ sonarqube_master_job:
only: only:
- master - master
script: script:
- ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.password=$SONAR_PASS - ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.organization=$SONAR_ORG -Dsonar.projectKey=$SONAR_PROJECT_KEY
sonarqube_preview_feature_job: sonarqube_preview_feature_job:
stage: test stage: test
...@@ -21,4 +19,4 @@ sonarqube_preview_feature_job: ...@@ -21,4 +19,4 @@ sonarqube_preview_feature_job:
script: script:
- git checkout origin/master - git checkout origin/master
- git merge $CI_COMMIT_SHA --no-commit --no-ff - git merge $CI_COMMIT_SHA --no-commit --no-ff
- ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.password=$SONAR_PASS -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME -Dsonar.gitab.project_id=$CI_PROJECT_ID - ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.organization=$SONAR_ORG -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME -Dsonar.gitab.project_id=$CI_PROJECT_ID
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment