Commit 8039a4b1 authored by 郭燕飞's avatar 郭燕飞 💬

Sonar support

parent 38352a0b
sonarqube_feature_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- gradle clean
- export
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.branch=dummy -Dsonar.login=reporter -Dsonar.password=duiba123456 -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -x test
stage: test
only:
- /^feature.*$/
tags:
- test
sonarqube_hotfix_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- gradle clean
- export
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.branch=dummy -Dsonar.login=reporter -Dsonar.password=duiba123456 -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -x test
stage: test
only:
- /^(hotfix|release).*$/
tags:
- test
sonarqube_develop_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- git checkout origin/develop
- gradle clean
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.login=reporter -Dsonar.password=duiba123456 -x test
only:
- develop
tags:
- test
......@@ -18,7 +18,19 @@ buildscript {
}
}
plugins {
id 'org.sonarqube' version '2.5'
}
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.projectName", "{artifactId}"
property "sonar.projectKey", "{groupId}:{artifactId}"
property "sonar.sourceEncoding","utf-8"
property "sonar.host.url","http://sonar.dui88.com"
}
}
allprojects {
apply plugin: "duiba.gradle.plugin"
apply plugin: "maven"
......@@ -50,7 +62,7 @@ subprojects {
dependencies {
imports {
mavenBom "cn.com.duiba.boot:spring-boot-ext-dependencies:1.2.242"
mavenBom "cn.com.duiba.boot:spring-boot-ext-dependencies:1.2.282"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR4"
}
}
......
sonarqube_feature_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- gradle clean
- export
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.branch=dummy -Dsonar.login=reporter -Dsonar.password=duiba123456 -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -x test
stage: test
only:
- /^feature.*$/
tags:
- test
sonarqube_hotfix_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- gradle clean
- export
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.branch=dummy -Dsonar.login=reporter -Dsonar.password=duiba123456 -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -x test
stage: test
only:
- /^(hotfix|release).*$/
tags:
- test
sonarqube_develop_preview:
script:
- git config --global user.email "sonar@duiba"
- git config --global user.name "sonar"
- git checkout origin/develop
- gradle clean
- gradle sonarqube -Dsonar.host.url=http://sonar.dui88.com -Dsonar.login=reporter -Dsonar.password=duiba123456 -x test
only:
- develop
tags:
- test
description = "{artifactId}"
plugins {
id 'org.sonarqube' version '2.5'
}
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.projectName", "{artifactId}"
property "sonar.projectKey", "{groupId}:{artifactId}"
property "sonar.sourceEncoding","utf-8"
property "sonar.host.url","http://sonar.dui88.com"
}
}
buildscript {
ext {
springBootVersion = "1.5.16.RELEASE"
......@@ -63,7 +75,7 @@ dependencyManagement {
dependencies {
imports {
mavenBom "cn.com.duiba.boot:spring-boot-ext-dependencies:1.2.242"
mavenBom "cn.com.duiba.boot:spring-boot-ext-dependencies:1.2.282"
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR4"
}
......
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