Commit aa6db8ce authored by daidekun's avatar daidekun

使用 buildCmd

parent 0fa3af76
......@@ -90,24 +90,29 @@ def checkout_lua_ui(branchName, gitRepo) {
t1.size().times {
dir (projects[it]) {
project_attr = project_attr(projects[it])
git_path = project_attr["gitPath"]
build_cmd = project_attr["buildCmd"]
currentPath = sh (
script: 'pwd',
returnStdout: true
).trim()
def folder = new File( "${currentPath}/.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"
git branch: branches[it], credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: git_path
def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
}
sh "npm install"
sh build_cmd
}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: 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_path
}
}
}
......@@ -117,11 +122,15 @@ def checkout_lua_ui(branchName, gitRepo) {
project = t1[1]
dir (project) {
git_path = project_attr(project)["gitPath"]
project_attr = project_attr(project)
git_path = project_attr["gitPath"]
build_cmd = project_attr["buildCmd"]
currentPath = sh (
script: 'pwd',
returnStdout: true
).trim()
def folder = new File( "${currentPath}/.git/hooks" )
if( !folder.exists() ) {
......@@ -131,7 +140,7 @@ def checkout_lua_ui(branchName, gitRepo) {
if (bowerFile) {
sh "bower install --allow-root"
}
sh "npm install"
sh build_cmd
}else{
sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh "chmod +x .git/hooks/post-merge"
......
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