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
ad9b7170
Commit
ad9b7170
authored
Jan 18, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui
parent
3be61dc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
25 deletions
+8
-25
StageBucketTke.groovy
src/org/qg/docker_new/StageBucketTke.groovy
+8
-18
qgDockerPiplineWithDockerSlaveTke.groovy
vars/qgDockerPiplineWithDockerSlaveTke.groovy
+0
-7
No files found.
src/org/qg/docker_new/StageBucketTke.groovy
View file @
ad9b7170
...
@@ -39,8 +39,7 @@ def init_dependency() {
...
@@ -39,8 +39,7 @@ def init_dependency() {
def
init_image_dependency
(
buildType
,
originSystemName
,
contextDir
){
def
init_image_dependency
(
buildType
,
originSystemName
,
contextDir
){
switch
(
buildType
){
switch
(
buildType
){
case
"lua-ui"
:
case
"lua-ui"
:
sh
"cp -rf /home/quant_group/qg-dockerfiles/templates/lua-ui/* ${contextDir}"
sh
"cp -rf /home/quant_group/qg-dockerfiles/tke/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/${originSystemName}.vh.conf"
def
isVhFileExist
=
fileExists
"/home/quant_group/config_repository/lua-ui/nginx/${originSystemName}.vh.conf"
if
(
isVhFileExist
)
{
if
(
isVhFileExist
)
{
...
@@ -48,15 +47,12 @@ def init_image_dependency(buildType,originSystemName,contextDir){
...
@@ -48,15 +47,12 @@ def init_image_dependency(buildType,originSystemName,contextDir){
}
else
{
}
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/nginx/default.vh.conf ${contextDir}"
}
}
break
break
default:
default:
break
break
}
}
}
}
def
ext_bower_install
(){
def
ext_bower_install
(){
def
bowerFile
=
fileExists
'./bower.json'
def
bowerFile
=
fileExists
'./bower.json'
if
(
bowerFile
){
if
(
bowerFile
){
...
@@ -329,11 +325,11 @@ def checkout_luaui(systemName, branchName) {
...
@@ -329,11 +325,11 @@ def checkout_luaui(systemName, branchName) {
echo
"- ${currentPath} -"
echo
"- ${currentPath} -"
sh
"whoami"
sh
"whoami"
echo
"----------------------------"
echo
"----------------------------"
def
npmrcPath
=
"/home/quant_group/config_repository/lua-ui/npmrc/${systemName}-npmrc"
//
def npmrcPath = "/home/quant_group/config_repository/lua-ui/npmrc/${systemName}-npmrc"
def
specialNpmrc
=
new
File
(
npmrcPath
)
//
def specialNpmrc = new File( npmrcPath )
if
(
specialNpmrc
.
exists
()){
//
if(specialNpmrc.exists()){
sh
"cp -rf ${npmrcPath} .npmrc"
//
sh "cp -rf ${npmrcPath} .npmrc"
}
//
}
_utils
().
beautyEcho
(
"ui project : ${systemName}"
,
"info"
)
_utils
().
beautyEcho
(
"ui project : ${systemName}"
,
"info"
)
projectAttr
=
project_attr
(
systemName
)
projectAttr
=
project_attr
(
systemName
)
...
@@ -346,8 +342,6 @@ def checkout_luaui(systemName, branchName) {
...
@@ -346,8 +342,6 @@ def checkout_luaui(systemName, branchName) {
if
(!
hookfolder
.
exists
()){
if
(!
hookfolder
.
exists
()){
echo
">>>>>>> first checkout project ${systemName}"
echo
">>>>>>> first checkout project ${systemName}"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
def
bowerResult
=
ext_bower_install
()
def
bowerResult
=
ext_bower_install
()
...
@@ -360,7 +354,6 @@ def checkout_luaui(systemName, branchName) {
...
@@ -360,7 +354,6 @@ def checkout_luaui(systemName, branchName) {
if
(!
dist
){
if
(!
dist
){
sh
"mkdir dist"
sh
"mkdir dist"
}
}
return
return
}
else
{
}
else
{
echo
">>>>>>> is node ui project"
echo
">>>>>>> is node ui project"
...
@@ -369,11 +362,9 @@ def checkout_luaui(systemName, branchName) {
...
@@ -369,11 +362,9 @@ def checkout_luaui(systemName, branchName) {
if
(
bowerFile
)
{
if
(
bowerFile
)
{
sh
"bower install --allow-root"
sh
"bower install --allow-root"
}
}
}
}
}
else
{
}
else
{
if
(!
packejson
.
exists
()){
if
(!
packejson
.
exists
()){
echo
">>>>>>> is simple ui project"
echo
">>>>>>> is simple ui project"
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
...
@@ -439,8 +430,7 @@ def prepare_nodejs(systemName, contextDir) {
...
@@ -439,8 +430,7 @@ def prepare_nodejs(systemName, contextDir) {
def
prepare_luaui
(
systemName
,
contextDir
)
{
def
prepare_luaui
(
systemName
,
contextDir
)
{
// sh "cp -rf /home/quant_group/config_repository/lua-ui/config/${systemName}.js ${systemName}.env.config"
// sh "cp -rf /home/quant_group/config_repository/lua-ui/config/${systemName}.js ${systemName}.env.config"
sh
"cp -rf /home/quant_group/config_repository/lua-ui/npmrc/common-npmrc /root/.npmrc"
sh
"cp -rf /home/quant_group/qg-dockerfiles/tke/ui/npmrc/common-npmrc /root/.npmrc"
}
}
def
prepare_python
(
systemName
,
contextDir
)
{
def
prepare_python
(
systemName
,
contextDir
)
{
...
@@ -565,7 +555,7 @@ def dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName,cluster,
...
@@ -565,7 +555,7 @@ def dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName,cluster,
args
+=
"--build-arg SAFE_SYSTEM_NAME=${systemName} "
args
+=
"--build-arg SAFE_SYSTEM_NAME=${systemName} "
args
+=
"--build-arg BUILD_SCHEMA=${build_schema} "
args
+=
"--build-arg BUILD_SCHEMA=${build_schema} "
args
+=
"--build-arg FROM_IMAGE=${imageTagCode} "
args
+=
"--build-arg FROM_IMAGE=${imageTagCode} "
def
imageCode
=
docker
.
build
(
imageTagCode
,
"-f ${contextDir}/
DockerfileCod
e ${contextDir}"
)
def
imageCode
=
docker
.
build
(
imageTagCode
,
"-f ${contextDir}/
Code.Dockerfil
e ${contextDir}"
)
imageCode
.
push
()
imageCode
.
push
()
def
image
=
docker
.
build
(
imageTag
,
"${args} ${contextDir}"
)
def
image
=
docker
.
build
(
imageTag
,
"${args} ${contextDir}"
)
image
.
push
()
image
.
push
()
...
...
vars/qgDockerPiplineWithDockerSlaveTke.groovy
View file @
ad9b7170
...
@@ -58,22 +58,15 @@ def call(body) {
...
@@ -58,22 +58,15 @@ def call(body) {
/* 2 */
/* 2 */
echo
originSystemName
echo
originSystemName
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
_utils
.
beautyEcho
(
"checkout & build < ${originSystemName} : ${originBranchName} >"
,
"stage"
)
_utils
.
beautyEcho
(
"checkout & build < ${originSystemName} : ${originBranchName} >"
,
"stage"
)
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
dir
(
systemNames
[
i
]){
dir
(
systemNames
[
i
]){
branchHashCode
=
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
,
imageType
)
branchHashCode
=
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
,
imageType
)
}
}
}
}
_utils
.
beautyEcho
(
"build over"
,
"info"
)
_utils
.
beautyEcho
(
"build over"
,
"info"
)
}
}
/* 3 */
/* 3 */
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
...
...
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