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
3116f431
Commit
3116f431
authored
Jan 17, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prod
parent
231742bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
StageBucketTke.groovy
src/org/qg/docker_new/StageBucketTke.groovy
+16
-12
qgDockerPiplineWithDockerSlaveTke.groovy
vars/qgDockerPiplineWithDockerSlaveTke.groovy
+2
-1
No files found.
src/org/qg/docker_new/StageBucketTke.groovy
View file @
3116f431
...
...
@@ -182,7 +182,7 @@ def getDocketPackageImage(buildType,buildEnv){
return
packageImageInfo
}
def
check_and_build
(
buildType
,
systemName
,
branchName
,
contextDir
){
def
check_and_build
(
buildType
,
systemName
,
branchName
,
contextDir
,
imageType
){
def
branchHashCode
=
null
...
...
@@ -207,17 +207,17 @@ def check_and_build(buildType,systemName,branchName,contextDir){
def
pacegeDockerInfo
=
getDocketPackageImage
(
buildType
,
buildEnv
)
if
(
buildType
in
[
"nodejs"
,
"lua-ui"
]){
branchHashCode
=
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
)
branchHashCode
=
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
,
imageType
)
}
else
{
docker
.
image
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
]){
branchHashCode
=
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
)
branchHashCode
=
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
,
imageType
)
}
}
return
branchHashCode
}
def
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
){
def
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
,
imageType
){
/*checkout code*/
stage
(
'Checkout'
)
{
...
...
@@ -228,7 +228,7 @@ def cpb(buildType,systemName,branchName,contextDir){
if
(
systemName
==
'xjd-ui'
&&
branchName
==
'apollo'
){
_utils
().
beautyEcho
(
"xjd-ui : apollo not exec prepare_config"
,
"info"
)
}
else
{
prepare_config
(
buildType
,
systemName
,
contextDir
)
prepare_config
(
buildType
,
systemName
,
contextDir
,
imageType
)
}
}
...
...
@@ -387,20 +387,20 @@ def checkout_luaui(systemName, branchName) {
}
}
def
prepare_config
(
buildType
,
systemName
,
contextDir
)
{
def
prepare_config
(
buildType
,
systemName
,
contextDir
,
imageType
)
{
_utils
().
beautyEcho
(
"Prepare Config +++ type:${buildType} systemName:${systemName}"
,
"info"
)
switch
(
buildType
)
{
case
"java"
:
prepare_java
(
systemName
,
contextDir
)
prepare_java
(
systemName
,
contextDir
,
imageType
)
break
case
"nodejs"
:
prepare_nodejs
(
systemName
,
contextDir
)
prepare_nodejs
(
systemName
,
contextDir
,
imageType
)
break
case
"python"
:
prepare_python
(
systemName
,
contextDir
)
prepare_python
(
systemName
,
contextDir
,
imageType
)
break
case
"lua-ui"
:
prepare_luaui
(
systemName
,
contextDir
)
prepare_luaui
(
systemName
,
contextDir
,
imageType
)
break
default:
_utils
().
beautyEcho
(
"未知的buildType: ${buildType}"
,
"fail"
)
...
...
@@ -408,8 +408,12 @@ def prepare_config(buildType,systemName, contextDir) {
}
}
def
prepare_java
(
systemName
,
contextDir
)
{
sh
"cp -rf /home/quant_group/qg-dockerfiles/tke/java/* ${contextDir}"
def
prepare_java
(
systemName
,
contextDir
,
imageType
)
{
if
(
imageType
==
"test"
)
{
sh
"cp -rf /home/quant_group/qg-dockerfiles/tke/java/* ${contextDir}"
}
else
{
sh
"cp -rf /home/quant_group/qg-dockerfiles/prod/java/* ${contextDir}"
}
def
existProperties
=
fileExists
"/home/quant_group/config_repository/java/${systemName}.properties"
...
...
vars/qgDockerPiplineWithDockerSlaveTke.groovy
View file @
3116f431
...
...
@@ -19,6 +19,7 @@ def call(body) {
def
originBranchName
=
env
.
BRANCH_NAME
def
namespace
=
env
.
NAMESPACE
def
isDeploy
=
env
.
IS_DEPLOY
def
imageType
=
env
.
TYPE
def
buildNumber
=
env
.
BUILD_NUMBER
def
cluster
=
env
.
CLUSTER
...
...
@@ -66,7 +67,7 @@ def call(body) {
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
dir
(
systemNames
[
i
]){
branchHashCode
=
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
)
branchHashCode
=
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
,
imageType
)
}
}
...
...
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