Commit 4de3816b authored by daidekun's avatar daidekun

namespace, systemName, contextDir, repoName, branchName, workspace

parent bc4c3c88
...@@ -67,8 +67,7 @@ def jsonParse(def json) { ...@@ -67,8 +67,7 @@ def jsonParse(def json) {
new groovy.json.JsonSlurperClassic().parseText(json) new groovy.json.JsonSlurperClassic().parseText(json)
} }
def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName, workspace) { def build_ui(namespace, systemName, contextDir, repoName, branchName, workspace) {
/* sh "ansible-playbook /etc/ansible/build.yml -e prefix=${namespace} -e project_name=pre.${systemName} -e repo_name=${repoName} -e branch_name=${branchName} -e workspace=${workspace}/${contextDir} -vv"*/
response = httpRequest "http://192.168.4.3:10088/config_server/get_node_command/${systemName}" response = httpRequest "http://192.168.4.3:10088/config_server/get_node_command/${systemName}"
def res_json = jsonParse(response.content) def res_json = jsonParse(response.content)
...@@ -86,14 +85,25 @@ def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName, ...@@ -86,14 +85,25 @@ def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName,
sh buildCmd sh buildCmd
sh 'tar zcf dist.tgz dist/' sh 'tar zcf dist.tgz dist/'
sh "mv dist.tgz ${contextDir}" sh "mv dist.tgz ${contextDir}"
}
/* if (bowerFile) { def build_nodejs(namespace, systemName, contextDir, repoName, branchName, workspace) {
sh "ansible-playbook /etc/ansible/build.yml -e prefix=${namespace} -e project_name=pre.${systemName} -e repo_name=${repoName} -e branch_name=${branchName} -e workspace=${workspace}/${contextDir} -vv" response = httpRequest "http://192.168.4.3:10088/config_server/get_node_command/${systemName}"
} else {
}*/ def res_json = jsonParse(response.content)
} print "=====Build Command Is====="
configPath = res_json["configPath"]
buildCmd = res_json["buildCmd"]
configName = systemName
print "=========================="
sh "cp -rf /home/quant_group/jenkins_home/workspace/pre.${systemName}/node_modules/ node_modules"
sh "mv -f env.config.js ${configPath}"
sh "npm install"
sh 'tar zcf dist.tgz dist/'
sh "mv dist.tgz ${contextDir}"
}
def build_python(namespace, systemName, contextDir) { def build_python(namespace, systemName, contextDir) {
sh "cp -rf ${contextDir}/config.ini server/config/release/config.ini" sh "cp -rf ${contextDir}/config.ini server/config/release/config.ini"
......
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