.gitlab-ci.yml 657 Bytes
Newer Older
Khalid Ali's avatar
Khalid Ali committed
1
2
3
before_script:
- apt-get update -qq && apt-get install -y -qq git

Khalid Ali's avatar
Khalid Ali committed
4
5
6
7
8
sonarqube_master_job:
  stage: test
  only:
  - master
  script:
Khalid Ali's avatar
Khalid Ali committed
9
  - ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.password=$SONAR_PASS
Khalid Ali's avatar
Khalid Ali committed
10
11
12
13
14
15
16

sonarqube_preview_feature_job:
  stage: test
  only:
  - /^feature\/*/
  script:
  - git checkout origin/master
17
  - git merge $CI_COMMIT_SHA --no-commit --no-ff
Khalid Ali's avatar
Khalid Ali committed
18
  - ./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