Commit ad9b7170 authored by 智勇's avatar 智勇

ui

parent 3be61dc4
......@@ -39,8 +39,7 @@ def init_dependency() {
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}"
sh "cp -rf /home/quant_group/qg-dockerfiles/tke/ui/* ${contextDir}"
def isVhFileExist = fileExists "/home/quant_group/config_repository/lua-ui/nginx/${originSystemName}.vh.conf"
if (isVhFileExist) {
......@@ -48,15 +47,12 @@ def init_image_dependency(buildType,originSystemName,contextDir){
}else{
sh "cp -rf /home/quant_group/config_repository/lua-ui/nginx/default.vh.conf ${contextDir}"
}
break
default:
break
}
}
def ext_bower_install(){
def bowerFile = fileExists './bower.json'
if(bowerFile){
......@@ -329,11 +325,11 @@ def checkout_luaui(systemName, branchName) {
echo "- ${currentPath} -"
sh "whoami"
echo "----------------------------"
def npmrcPath = "/home/quant_group/config_repository/lua-ui/npmrc/${systemName}-npmrc"
def specialNpmrc = new File( npmrcPath )
if(specialNpmrc.exists()){
sh "cp -rf ${npmrcPath} .npmrc"
}
// def npmrcPath = "/home/quant_group/config_repository/lua-ui/npmrc/${systemName}-npmrc"
// def specialNpmrc = new File( npmrcPath )
// if(specialNpmrc.exists()){
// sh "cp -rf ${npmrcPath} .npmrc"
// }
_utils().beautyEcho("ui project : ${systemName}" , "info")
projectAttr = project_attr(systemName)
......@@ -346,8 +342,6 @@ def checkout_luaui(systemName, branchName) {
if(!hookfolder.exists()){
echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
def bowerResult = ext_bower_install()
......@@ -360,7 +354,6 @@ def checkout_luaui(systemName, branchName) {
if(!dist){
sh "mkdir dist"
}
return
} else {
echo ">>>>>>> is node ui project"
......@@ -369,11 +362,9 @@ def checkout_luaui(systemName, branchName) {
if (bowerFile) {
sh "bower install --allow-root"
}
}
}else{
if(!packejson.exists()){
echo ">>>>>>> is simple ui project"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
......@@ -439,8 +430,7 @@ def prepare_nodejs(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/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) {
......@@ -565,7 +555,7 @@ def dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName,cluster,
args += "--build-arg SAFE_SYSTEM_NAME=${systemName} "
args += "--build-arg BUILD_SCHEMA=${build_schema} "
args += "--build-arg FROM_IMAGE=${imageTagCode} "
def imageCode = docker.build(imageTagCode, "-f ${contextDir}/DockerfileCode ${contextDir}")
def imageCode = docker.build(imageTagCode, "-f ${contextDir}/Code.Dockerfile ${contextDir}")
imageCode.push()
def image = docker.build(imageTag, "${args} ${contextDir}")
image.push()
......
......@@ -58,22 +58,15 @@ def call(body) {
/* 2 */
echo originSystemName
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
_utils.beautyEcho("checkout & build < ${originSystemName} : ${originBranchName} >", "stage")
for(def i = 0; i<systemNames.length; i++){
dir(systemNames[i]){
branchHashCode = _stage.check_and_build(config.buildType, systemNames[i], branchNames[i], contextDir, imageType)
}
}
_utils.beautyEcho("build over", "info")
}
/* 3 */
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment