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
2bc75d0f
Commit
2bc75d0f
authored
Dec 27, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化gitrepo参数
parent
b7d390a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
StageBucket.groovy
src/org/qg/docker/StageBucket.groovy
+12
-3
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+4
-4
No files found.
src/org/qg/docker/StageBucket.groovy
View file @
2bc75d0f
...
...
@@ -48,10 +48,19 @@ def prepare_python(contextDir) {
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}"
}
def
checkout
(
branchNames
,
gitRepo
)
{
arrBranchName
=
branchNames
.
split
(
","
)
def
checkout
(
branchNames
,
systemNames
)
{
arrBranchName
=
branchNames
.
split
(
"--"
)
arrSystemName
=
systemNames
.
split
(
"--"
)
i
=
0
for
(
branchName
in
arrBranchName
)
{
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${gitRepo}.git"
response
=
httpRequest
"http://192.168.4.3:10088/config_server/get_node_command/${systemNames}"
def
res_json
=
jsonParse
(
response
.
content
)
def
gitGroup
=
res_json
[
"gitGroup"
]
git
branch:
arrBranchName
[
i
],
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${gitGroup}/${systemName}.git"
i
=
i
+
1
}
}
...
...
vars/qgDockerPipeline.groovy
View file @
2bc75d0f
...
...
@@ -11,9 +11,9 @@ def call(body) {
def
isDeploy
=
env
.
IS_DEPLOY
def
buildNumber
=
env
.
BUILD_NUMBER
t
=
gitRepo
.
split
(
"/"
)
def
gitGroup
=
t
[
0
]
def
originSystemName
=
t
[
1
]
/*
t = gitRepo.split("/")
def gitGroup = t[0]
*/
def
originSystemName
=
gitRepo
def
systemName
=
originSystemName
.
toLowerCase
()
def
harborGroup
=
"library"
...
...
@@ -66,7 +66,7 @@ def call(body) {
}
}
stage
(
'Build'
)
{
stage
(
'Build'
)
{
8
_utils
.
beautyEcho
(
4
,
'Build'
)
switch
(
config
.
buildType
)
{
case
"java"
:
...
...
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