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
72ba510e
Commit
72ba510e
authored
Jan 03, 2018
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkout bugs
parent
8ccd3c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
StageBucket.groovy
src/org/qg/docker/StageBucket.groovy
+12
-8
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+9
-8
No files found.
src/org/qg/docker/StageBucket.groovy
View file @
72ba510e
...
@@ -46,12 +46,18 @@ def prepare_python(contextDir) {
...
@@ -46,12 +46,18 @@ def prepare_python(contextDir) {
sh
"cd /home/quant_group/qg-dockerfiles/templates/python; git pull; cd -"
sh
"cd /home/quant_group/qg-dockerfiles/templates/python; git pull; cd -"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}"
}
}
/*
def checkout(branchName, gitRepo) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:${gitRepo}.git"
}*/
def
checkout
(
branchName
,
gitRepo
)
{
def
checkout
(
branchName
,
gitRepo
)
{
echo
"git remote site is:"
if
(
gitRepo
in
[
"QG/di-ting"
])
{
echo
"git@gitabc.xyqb.com:${gitRepo}.git"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@gitabc.xyqb.com:${gitRepo}.git"
}
else
{
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${gitRepo}.git"
}
}
def
checkoutLuaUI
(
branchName
,
gitRepo
)
{
if
(
gitRepo
.
contains
(
"--"
)){
if
(
gitRepo
.
contains
(
"--"
)){
t1
=
gitRepo
.
split
(
"/"
)
t1
=
gitRepo
.
split
(
"/"
)
groups
=
t1
[
0
].
split
(
"--"
)
groups
=
t1
[
0
].
split
(
"--"
)
...
@@ -70,7 +76,7 @@ def checkout(branchName, gitRepo) {
...
@@ -70,7 +76,7 @@ def checkout(branchName, gitRepo) {
dir
(
project
)
{
dir
(
project
)
{
echo
"git remote site is:"
echo
"git remote site is:"
if
(
gitRepo
in
[
"QG/di-ting-ui"
,
"QG/di-ting"
])
{
if
(
gitRepo
in
[
"QG/di-ting-ui"
])
{
echo
"git@gitabc.xyqb.com:${gitRepo}.git"
echo
"git@gitabc.xyqb.com:${gitRepo}.git"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@gitabc.xyqb.com:${gitRepo}.git"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@gitabc.xyqb.com:${gitRepo}.git"
}
else
{
}
else
{
...
@@ -81,9 +87,7 @@ def checkout(branchName, gitRepo) {
...
@@ -81,9 +87,7 @@ def checkout(branchName, gitRepo) {
}
}
def
build_java
(
namespace
,
systemName
,
contextDir
)
{
def
build_java
(
namespace
,
systemName
,
contextDir
)
{
dir
(
systemName
)
{
sh
'/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'
sh
'/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'
}
}
}
def
copy_files_java
(
systemName
,
contextDir
)
{
def
copy_files_java
(
systemName
,
contextDir
)
{
...
...
vars/qgDockerPipeline.groovy
View file @
72ba510e
...
@@ -38,7 +38,14 @@ def call(body) {
...
@@ -38,7 +38,14 @@ def call(body) {
stage
(
'Checkout'
)
{
stage
(
'Checkout'
)
{
_utils
.
beautyEcho
(
2
,
'Checkout'
)
_utils
.
beautyEcho
(
2
,
'Checkout'
)
_stage
.
checkout
(
branchName
,
gitRepo
)
switch
(
config
.
buildType
)
{
case
"lua-ui"
:
_stage
.
checkoutLuaUI
(
branchName
,
gitRepo
)
break
default:
_stage
.
checkout
(
branchName
,
gitRepo
)
break
}
}
}
stage
(
'Prepare'
)
{
stage
(
'Prepare'
)
{
...
@@ -48,9 +55,6 @@ def call(body) {
...
@@ -48,9 +55,6 @@ def call(body) {
case
"java"
:
case
"java"
:
_stage
.
prepare_java
(
systemName
,
contextDir
)
_stage
.
prepare_java
(
systemName
,
contextDir
)
break
break
/* case "ui":
_stage.prepare_ui(systemName, contextDir)
break*/
case
"nodejs"
:
case
"nodejs"
:
_stage
.
prepare_nodejs
(
systemName
,
contextDir
)
_stage
.
prepare_nodejs
(
systemName
,
contextDir
)
break
break
...
@@ -71,10 +75,7 @@ def call(body) {
...
@@ -71,10 +75,7 @@ def call(body) {
switch
(
config
.
buildType
)
{
switch
(
config
.
buildType
)
{
case
"java"
:
case
"java"
:
_stage
.
build_java
(
namespace
,
originSystemName
,
contextDir
)
_stage
.
build_java
(
namespace
,
originSystemName
,
contextDir
)
break
break
/* case "ui":
_stage.build_ui(namespace, originSystemName, contextDir, gitRepo, branchName, workspace)
break*/
case
"nodejs"
:
case
"nodejs"
:
_stage
.
build_nodejs
(
namespace
,
originSystemName
,
contextDir
,
gitRepo
,
branchName
,
workspace
)
_stage
.
build_nodejs
(
namespace
,
originSystemName
,
contextDir
,
gitRepo
,
branchName
,
workspace
)
break
break
...
...
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