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
b6c342d2
Commit
b6c342d2
authored
May 03, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fffffff
parent
58b93c21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
+8
-16
StageBucket.groovy
src/org/qg/ci/StageBucket.groovy
+5
-6
qgCiSonar.groovy
vars/qgCiSonar.groovy
+3
-10
No files found.
src/org/qg/ci/StageBucket.groovy
View file @
b6c342d2
...
@@ -27,7 +27,7 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){
...
@@ -27,7 +27,7 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){
}
}
def
callback_pipes
(
info
)
{
def
callback_pipes
(
taskId
)
{
sleep
3
sleep
3
sonarInfo
=
sh
(
script:
'cat .sonar/report-task.txt |awk \'{printf $0 "&"}\''
,
returnStdout:
true
).
trim
()
sonarInfo
=
sh
(
script:
'cat .sonar/report-task.txt |awk \'{printf $0 "&"}\''
,
returnStdout:
true
).
trim
()
...
@@ -41,13 +41,12 @@ def callback_pipes(info) {
...
@@ -41,13 +41,12 @@ def callback_pipes(info) {
}
}
body
=[:]
body
=[:]
body
[
"taskId"
]
=
info
[
"taskId"
]
body
[
"taskId"
]
=
taskId
body
[
"content"
]
=
content
body
[
"content"
]
=
content
def
bodyJson
=
JsonOutput
.
toJson
(
body
)
def
bodyJson
=
JsonOutput
.
toJson
(
body
)
echo
bodyJson
echo
bodyJson
dest_url
=
"http://192.168.28.141:8080/callback/ci/triger"
dest_url
=
"http://192.168.28.141:8080/callback/ci/triger"
response
=
httpRequest
httpMode:
"POST"
,
response
=
httpRequest
httpMode:
"POST"
,
...
@@ -56,8 +55,8 @@ def callback_pipes(info) {
...
@@ -56,8 +55,8 @@ def callback_pipes(info) {
requestBody:
"${bodyJson}"
,
requestBody:
"${bodyJson}"
,
url:
dest_url
url:
dest_url
def
res_json
=
jsonParse
(
response
.
content
)
/*
def res_json = jsonParse(response.content)
return
res_json
return res_json
*/
/*callbackData = "${sonarReportTask}pipelineEntityId=aaa&taskNum=1"
/*callbackData = "${sonarReportTask}pipelineEntityId=aaa&taskNum=1"
...
...
vars/qgCiSonar.groovy
View file @
b6c342d2
...
@@ -7,16 +7,9 @@ def call(body) {
...
@@ -7,16 +7,9 @@ def call(body) {
def
GIT_BRANCH
=
env
.
GIT_BRANCH
def
GIT_BRANCH
=
env
.
GIT_BRANCH
def
GIT_BRANCH_HASH
=
env
.
GIT_BRANCH_HASH
def
GIT_BRANCH_HASH
=
env
.
GIT_BRANCH_HASH
def
GIT_TRIGER_USER
=
env
.
GIT_TRIGER_USER
def
GIT_TRIGER_USER
=
env
.
GIT_TRIGER_USER
def
PIPELINE_ID
=
env
.
PIPELINE_ID
def
TASK_INDEX
=
env
.
TASK_ID
def
STAGE_INDEX
=
env
.
STAGE_INDEX
def
TASK_INDEX
=
env
.
TASK_INDEX
def
info
=
[
pipline_id
:
PIPELINE_ID
,
stage_index:
STAGE_INDEX
,
task_index:
TASK_INDEX
,
context:
[]
]
def
currentPath
def
currentPath
...
@@ -43,7 +36,7 @@ echo "\033[32m############################################\n\
...
@@ -43,7 +36,7 @@ echo "\033[32m############################################\n\
}
}
stage
(
"callback"
){
stage
(
"callback"
){
_stage
.
callback_pipes
(
info
)
_stage
.
callback_pipes
(
TASK_INDEX
)
}
}
}
}
...
...
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