Commit c4ff8827 authored by wentao.suo's avatar wentao.suo

ffff

parent 8bc153bd
...@@ -82,14 +82,13 @@ def prepare_python(systemName, contextDir) { ...@@ -82,14 +82,13 @@ def prepare_python(systemName, contextDir) {
def checkout(buildType,systemName, branchName) { def checkout(buildType,systemName, branchName) {
def projectAttr = project_attr(systemName)
def gitPath =projectAttr["gitPath"]
switch(buildType){ switch(buildType){
case "java": case "java":
build_java(gitPath, branchName) build_java(systemName, branchName)
break break
case "nodejs": case "nodejs":
build_nodejs(gitPath, branchName) build_nodejs(systemName, branchName)
break break
case "python": case "python":
build_python(gitPath, branchName) build_python(gitPath, branchName)
...@@ -103,13 +102,15 @@ def checkout(buildType,systemName, branchName) { ...@@ -103,13 +102,15 @@ def checkout(buildType,systemName, branchName) {
} }
} }
def checkout_java(gitPath, branchName) { def checkout_java(systemName, branchName) {
def projectAttr = project_attr(systemName)
def gitPath =projectAttr["gitPath"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
} }
def checkout_nodejs(systemName, branchName) {
def checkout_nodejs(gitPth, branchName) { def projectAttr = project_attr(systemName)
def gitPath =projectAttr["gitPath"]
currentPath = sh ( currentPath = sh (
script: 'pwd', script: 'pwd',
returnStdout: true returnStdout: true
...@@ -132,12 +133,12 @@ def checkout_nodejs(gitPth, branchName) { ...@@ -132,12 +133,12 @@ def checkout_nodejs(gitPth, branchName) {
} }
} }
def checkout_lua_ui(gitPaths, branchName) { def checkout_lua_ui(systemNames, branchNames) {
if(gitPaths.contains("--")){ if(systemNames.contains("--")){
t1 = gitPths.split("/") t1 = systemNames.split("/")
groups = t1[0].split("--")
projects = t1[1].split("--") projects = t1[1].split("--")
branches = branchName.split("--") branches = branchNames.split("--")
t1.size().times { t1.size().times {
...@@ -169,11 +170,10 @@ def checkout_lua_ui(gitPaths, branchName) { ...@@ -169,11 +170,10 @@ def checkout_lua_ui(gitPaths, branchName) {
} }
} }
else{ else{
t1 = gitRepo.split("/") def systemName = systemNames
project = t1[1] def branchName = branchNames
dir (systemName) {
dir (project) { projectAttr = project_attr(systemName)
projectAttr = project_attr(project)
gitPath = projectAttr["gitPath"] gitPath = projectAttr["gitPath"]
currentPath = sh ( currentPath = sh (
...@@ -223,14 +223,13 @@ def build(buildType,systemName, contextDir){ ...@@ -223,14 +223,13 @@ def build(buildType,systemName, contextDir){
} }
def build_java(systemName, contextDir) { def build_java(systemName, contextDir) {
def res_json = project_attr(systemName) def res_json = project_attr(systemName)
buildCmd = res_json["buildCmd"] buildCmd = res_json["buildCmd"]
jarFilePath = project_attr["jarFilePath"] jarFilePath = project_attr["jarFilePath"]
sh "${buildCmd}" sh buildCmd
sh "cp ${jarFilePath}/*.jar ${contextDir}/app.jar" sh "cp ${jarFilePath}/*.jar ${contextDir}/app.jar"
} }
......
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