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
83f384fd
Commit
83f384fd
authored
Jan 12, 2018
by
tywldx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.quantgroup.cn/QA/global-jenkinsfile
# Conflicts: # src/org/qg/docker/StageBucket.groovy
parents
a7f92102
9a70561f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
19 deletions
+62
-19
StageBucket.groovy
src/org/qg/docker/StageBucket.groovy
+59
-19
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+3
-0
No files found.
src/org/qg/docker/StageBucket.groovy
View file @
83f384fd
...
...
@@ -15,7 +15,7 @@ def debug() {
def
before_prepare
(
contextDir
)
{
sh
"rm -rf ${contextDir}"
sh
"cd /home/quant_group/qg-dockerfiles; git pull; cd -"
sh
"cd /home/quant_group/config_repository; git pull origin
new-config
; cd -"
sh
"cd /home/quant_group/config_repository; git pull origin
master
; cd -"
}
def
prepare_java
(
systemName
,
contextDir
)
{
...
...
@@ -56,6 +56,27 @@ def checkout(branchName, systemName) {
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
}
def
checkout_nodejs
(
branchName
,
systemName
)
{
git_path
=
project_attr
(
systemName
)[
"gitPath"
]
def
folder
=
new
File
(
'.git/hooks/'
)
if
(
!
folder
.
exists
()
)
{
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
def
bowerFile
=
fileExists
'./bower.json'
if
(
bowerFile
)
{
sh
"bower install --allow-root"
}
sh
"npm install"
}
else
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh
"chmod +x .git/hooks/post-merge"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
}
}
def
checkout_lua_ui
(
branchName
,
gitRepo
)
{
if
(
gitRepo
.
contains
(
"--"
)){
t1
=
gitRepo
.
split
(
"/"
)
...
...
@@ -65,10 +86,28 @@ def checkout_lua_ui(branchName, gitRepo) {
t1
.
size
().
times
{
dir
(
projects
[
it
])
{
<<<<<<<
HEAD
sh
"\\config_repositoryp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh
"chmod +x .git/hooks/post-merge"
=======
def
folder
=
new
File
(
'.git/hooks/'
)
if
(
!
folder
.
exists
()
)
{
git
branch:
branches
[
it
],
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${groups[it]}/${projects[it]}.git"
def
bowerFile
=
fileExists
'./bower.json'
if
(
bowerFile
)
{
sh
"bower install --allow-root"
}
sh
"npm install"
}
else
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh
"chmod +x .git/hooks/post-merge"
>>>>>>>
9
a70561f7a998386aa5fce9e043c1a9747007410
git
branch:
branches
[
it
],
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${groups[it]}/${projects[it]}.git"
git
branch:
branches
[
it
],
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
"git@git.quantgroup.cn:${groups[it]}/${projects[it]}.git"
}
}
}
}
...
...
@@ -77,12 +116,25 @@ def checkout_lua_ui(branchName, gitRepo) {
project
=
t1
[
1
]
dir
(
project
)
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh
"chmod +x .git/hooks/post-merge"
git_path
=
project_attr
(
project
)[
"gitPath"
]
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
}
def
folder
=
new
File
(
'.git/hooks/'
)
if
(
!
folder
.
exists
()
)
{
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
def
bowerFile
=
fileExists
'./bower.json'
if
(
bowerFile
)
{
sh
"bower install --allow-root"
}
sh
"npm install"
}
else
{
sh
"cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh
"chmod +x .git/hooks/post-merge"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
git_path
}
}
}
}
...
...
@@ -117,12 +169,6 @@ def build_nodejs(namespace, systemName, contextDir) {
configPath
=
res_json
[
"configPath"
]
buildCmd
=
res_json
[
"buildCmd"
]
configName
=
systemName
/* def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
}*/
sh
"mv -f env.config.js ${configPath}"
sh
'tar zcf dist.tgz ./*'
...
...
@@ -148,12 +194,6 @@ def build_luaui(namespace, systemNames, contextDir) {
sh
"mv -f ../${systemName}.env.config.js ${configPath}"
/* def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
}*/
sh
buildCmd
sh
"tar zcf ${systemName}.tgz dist/"
...
...
vars/qgDockerPipeline.groovy
View file @
83f384fd
...
...
@@ -44,6 +44,9 @@ def call(body) {
case
"lua-ui"
:
_stage
.
checkout_lua_ui
(
branchName
,
gitRepo
)
break
case
"nodejs"
:
_stage
.
checkout_nodejs
(
branchName
,
systemName
)
break
default:
_stage
.
checkout
(
branchName
,
systemName
)
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