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
a56f5199
Commit
a56f5199
authored
Jan 04, 2018
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_stage.
parent
5d6821f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
16 deletions
+5
-16
StageBucket.groovy
src/org/qg/docker/StageBucket.groovy
+4
-16
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+1
-0
No files found.
src/org/qg/docker/StageBucket.groovy
View file @
a56f5199
...
@@ -3,35 +3,24 @@ package org.qg.docker;
...
@@ -3,35 +3,24 @@ package org.qg.docker;
import
org.qg.docker.Utils
;
import
org.qg.docker.Utils
;
import
groovy.json.JsonSlurperClassic
;
import
groovy.json.JsonSlurperClassic
;
def
_utils
=
new
Utils
();
def
before_prepare
(
contextDir
)
{
sh
"rm -rf ${contextDir}"
def
debug
()
{
sh
"cd /home/quant_group/qg-dockerfiles; git pull; cd -"
_utils
.
beautyEcho
(
1
,
'Checkout'
)
sh
"cd /home/quant_group/config_repository; git pull; cd -"
}
}
def
prepare_java
(
systemName
,
contextDir
)
{
def
prepare_java
(
systemName
,
contextDir
)
{
sh
"rm -rf ${contextDir}"
sh
"cd /home/quant_group/qg-dockerfiles/templates/java; git pull; cd -"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/java ${contextDir}"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/java ${contextDir}"
sh
"cd /home/quant_group/config_repository/java; git pull; cd -"
sh
"cp -rf /home/quant_group/config_repository/java/${systemName}.properties ${contextDir}/application.properties"
sh
"cp -rf /home/quant_group/config_repository/java/${systemName}.properties ${contextDir}/application.properties"
}
}
def
prepare_nodejs
(
systemName
,
contextDir
)
{
def
prepare_nodejs
(
systemName
,
contextDir
)
{
sh
"rm -rf ${contextDir}"
sh
"cd /home/quant_group/qg-dockerfiles/templates/nodejs; git pull; cd -"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/nodejs ${contextDir}"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/nodejs ${contextDir}"
sh
"cd /home/quant_group/config_repository/java; git pull; cd -"
sh
"cp -rf /home/quant_group/config_repository/nodejs/${systemName}.js env.config.js"
sh
"cp -rf /home/quant_group/config_repository/nodejs/${systemName}.js env.config.js"
}
}
def
prepare_luaui
(
systemNames
,
contextDir
)
{
def
prepare_luaui
(
systemNames
,
contextDir
)
{
sh
"rm -rf ${contextDir}"
sh
"cd /home/quant_group/qg-dockerfiles/templates/lua-ui; git pull; cd -"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/lua-ui ${contextDir}"
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/lua-ui ${contextDir}"
sh
"cd /home/quant_group/config_repository/lua-ui; git pull; cd -"
sh
"cp -rf /home/quant_group/config_repository/lua-ui/lua/*.lua ${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"
def
isVhFileExist
=
fileExists
"/home/quant_group/config_repository/lua-ui/nginx/${systemNames}.vh.conf"
...
@@ -49,7 +38,6 @@ def prepare_luaui(systemNames, contextDir) {
...
@@ -49,7 +38,6 @@ def prepare_luaui(systemNames, contextDir) {
def
prepare_python
(
contextDir
)
{
def
prepare_python
(
contextDir
)
{
sh
"rm -rf ${contextDir}"
sh
"rm -rf ${contextDir}"
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}"
}
}
...
...
vars/qgDockerPipeline.groovy
View file @
a56f5199
...
@@ -51,6 +51,7 @@ def call(body) {
...
@@ -51,6 +51,7 @@ def call(body) {
stage
(
'Prepare'
)
{
stage
(
'Prepare'
)
{
_utils
.
beautyEcho
(
3
,
'Prepare'
)
_utils
.
beautyEcho
(
3
,
'Prepare'
)
contextDir
=
_utils
.
contextDir
(
workspace
)
contextDir
=
_utils
.
contextDir
(
workspace
)
_stage
.
before_prepare
(
contextDir
)
switch
(
config
.
buildType
)
{
switch
(
config
.
buildType
)
{
case
"java"
:
case
"java"
:
_stage
.
prepare_java
(
systemName
,
contextDir
)
_stage
.
prepare_java
(
systemName
,
contextDir
)
...
...
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