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
fe4c5e17
Commit
fe4c5e17
authored
Apr 16, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lua-ui
parent
ef0a5821
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
18 deletions
+28
-18
StageBucket.groovy
src/org/qg/docker_new/StageBucket.groovy
+25
-16
qgDockerPiplineWithDockerSlave.groovy
vars/qgDockerPiplineWithDockerSlave.groovy
+3
-2
No files found.
src/org/qg/docker_new/StageBucket.groovy
View file @
fe4c5e17
...
...
@@ -22,11 +22,32 @@ def imageTag(harborGroup,k8sSystemName,safeBranchName,timeStemp){
return
"192.168.4.36/${harborGroup}/${k8sSystemName}:${safeBranchName}-${timeStemp}"
}
def
before_prepare
()
{
def
init_dependency
()
{
sh
"cd /home/quant_group/qg-dockerfiles; git pull; cd -"
sh
"cd /home/quant_group/config_repository; git pull origin master; cd -"
}
def
init_image_dependency
(
buildType
,
originSystemName
,
contextDir
){
switch
(
buildType
){
case
"lua-ui"
:
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/lua-ui/* ${contextDir}"
sh
"cp -rf /home/quant_group/config_repository/lua-ui/lua/*.lua ${contextDir}"
def
isVhFileExist
=
fileExists
"/home/quant_group/config_repository/lua-ui/nginx/${systemNames}.vh.conf"
if
(
isVhFileExist
)
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/nginx/${systemNames}.vh.conf ${contextDir}"
}
else
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/nginx/default.vh.conf ${contextDir}"
}
break
default:
break
}
}
def
prepare_config
(
buildType
,
systemName
,
contextDir
)
{
_utils
().
beautyEcho
(
"Prepare Config +++ type:${buildType} systemName:${systemName}"
,
"info"
)
switch
(
buildType
)
{
...
...
@@ -59,19 +80,7 @@ def prepare_nodejs(systemName, contextDir) {
}
def
prepare_luaui
(
systemName
,
contextDir
)
{
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/lua-ui/* ${contextDir}"
sh
"cp -rf /home/quant_group/config_repository/lua-ui/lua/*.lua ${contextDir}"
def
isVhFileExist
=
fileExists
"/home/quant_group/config_repository/lua-ui/nginx/${systemName}.vh.conf"
if
(
isVhFileExist
)
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/nginx/${systemName}.vh.conf ${contextDir}"
}
else
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/nginx/default.vh.conf ${contextDir}"
}
sh
"cp -rf /home/quant_group/config_repository/lua-ui/config/${systemName}.js ${systemName}.env.config.js"
}
def
prepare_python
(
systemName
,
contextDir
)
{
...
...
@@ -380,7 +389,7 @@ def check_and_build(buildType,systemName,branchName,contextDir){
}
}
def
dockerbuild_and_push
(
imageTag
,
buildNumber
,
systemName
,
branchName
,
cluster
,
timeStemp
){
def
dockerbuild_and_push
(
imageTag
,
buildNumber
,
systemName
,
branchName
,
cluster
,
timeStemp
,
contextDir
){
//systemName == originSystemName
stage
(
'Docker Build And Push'
)
{
withDockerRegistry
([
credentialsId:
'harbor-qajenkins'
,
url:
"http://192.168.4.36"
])
{
...
...
vars/qgDockerPiplineWithDockerSlave.groovy
View file @
fe4c5e17
...
...
@@ -44,7 +44,8 @@ def call(body) {
stage
(
'Init'
)
{
_utils
.
beautyEcho
(
"Init"
,
"stage"
)
contextDir
=
_stage
.
contextMkdir
(
"${originSystemName}-${timeStemp}"
)
_stage
.
before_prepare
()
_stage
.
init_dependency
()
_stage
.
init_image_dependency
(
config
.
buildType
,
originSystemName
,
contextDir
)
}
...
...
@@ -75,7 +76,7 @@ def call(body) {
imageTag
=
_stage
.
imageTag
(
harborGroup
,
k8sSystemName
,
safeBranchName
,
timeStemp
)
def
_systemName
=
originSystemName
.
toLowerCase
()
_stage
.
dockerbuild_and_push
(
imageTag
,
buildNumber
,
_systemName
,
originBranchName
,
cluster
,
timeStemp
)
_stage
.
dockerbuild_and_push
(
imageTag
,
buildNumber
,
_systemName
,
originBranchName
,
cluster
,
timeStemp
,
contextDir
)
_utils
.
beautyEcho
(
"Deploy To K8s Cluster image: ${imageTag} to:${namespace}"
,
"stage"
)
_stage
.
deploy
(
namespace
,
_systemName
,
imageTag
,
config
.
tier
,
isDeploy
)
...
...
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