Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
global-jenkinsfile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
global-jenkinsfile
Commits
bda97b02
Commit
bda97b02
authored
Apr 28, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fff
parent
3290f9af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
StageBucket.groovy
src/org/qg/ci/StageBucket.groovy
+3
-3
qgCiSonar.groovy
vars/qgCiSonar.groovy
+5
-1
No files found.
src/org/qg/ci/StageBucket.groovy
View file @
bda97b02
...
@@ -9,9 +9,9 @@ def _utils() {
...
@@ -9,9 +9,9 @@ def _utils() {
}
}
def
sonaar_check
(){
def
sonaar_check
(
GIT_REPO_NAME
,
GIT_BRANCH
,
currentPath
){
_utils
().
beautyEcho
(
"sonar check +++"
,
"info"
)
_utils
().
beautyEcho
(
"sonar check +++"
,
"info"
)
/*
sonarScanner
=
"/home/quant_group/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar/bin/sonar-scanner"
sonarScanner
=
"/home/quant_group/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar/bin/sonar-scanner"
currentPath
=
sh
(
script:
'pwd'
,
returnStdout:
true
).
trim
()
currentPath
=
sh
(
script:
'pwd'
,
returnStdout:
true
).
trim
()
git
branch:
"${GIT_BRANCH}"
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"${GIT_PEPO_SSH_URL}"
git
branch:
"${GIT_BRANCH}"
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"${GIT_PEPO_SSH_URL}"
...
@@ -23,7 +23,7 @@ def sonaar_check(){
...
@@ -23,7 +23,7 @@ def sonaar_check(){
-Dsonar.java.binaries=. \
-Dsonar.java.binaries=. \
-Dsonar.sources=. \
-Dsonar.sources=. \
-Dsonar.projectBaseDir=${currentPath}"
-Dsonar.projectBaseDir=${currentPath}"
*/
}
}
...
...
vars/qgCiSonar.groovy
View file @
bda97b02
...
@@ -18,6 +18,8 @@ def call(body) {
...
@@ -18,6 +18,8 @@ def call(body) {
context:
[]
context:
[]
]
]
def
currentPath
/*body.resolveStrategy = Closure.DELEGATE_FIRST
/*body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body.delegate = config
body()*/
body()*/
...
@@ -34,8 +36,10 @@ echo "\033[32m############################################\n\
...
@@ -34,8 +36,10 @@ echo "\033[32m############################################\n\
node
{
node
{
dir
(
GIT_REPO_NAME
){
dir
(
GIT_REPO_NAME
){
urrentPath
=
sh
(
script:
'pwd'
,
returnStdout:
true
).
trim
()
stage
(
"SonarQube Quality Gate"
){
stage
(
"SonarQube Quality Gate"
){
def
gitRepoName
=
"${GIT_REPO_NAME}"
_stage
.
sonaar_check
(
GIT_REPO_NAME
,
GIT_BRANCH
,
currentPath
)
}
}
stage
(
"callback"
){
stage
(
"callback"
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment