Commit d2aef7e0 authored by daidekun's avatar daidekun

fixbugs

parent 37c6446f
...@@ -65,7 +65,9 @@ def jsonParse(def json) { ...@@ -65,7 +65,9 @@ def jsonParse(def json) {
} }
def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName) { def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName) {
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}"
workspace = new File(getClass().protectionDomain.codeSource.location.path).parent
def res_json = jsonParse(response.content) def res_json = jsonParse(response.content)
print "=====Build Command Is=====" print "=====Build Command Is====="
configPath = res_json["configPath"] configPath = res_json["configPath"]
...@@ -79,7 +81,7 @@ def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName) ...@@ -79,7 +81,7 @@ def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName)
def bowerFile = fileExists './bower.json' def bowerFile = fileExists './bower.json'
if (bowerFile) { if (bowerFile) {
sh "ansible-playbook /etc/ansible/deploy.yml -e project_name=pre.${systemName} -e repo_name=${repoName} -e branch_name=${branchName} -vv" sh "ansible-playbook /etc/ansible/deploy.yml -e project_name=pre.${systemName} -e repo_name=${repoName} -e branch_name=${branchName} -e workspace=${workspace}/${contextDir} -vv"
} else { } else {
sh buildCmd sh buildCmd
sh 'tar zcf dist.tgz dist/' sh 'tar zcf dist.tgz dist/'
......
...@@ -3,6 +3,6 @@ package org.qg; ...@@ -3,6 +3,6 @@ package org.qg;
def contextDir(workspace) { def contextDir(workspace) {
uuid = UUID.randomUUID().toString() uuid = UUID.randomUUID().toString()
contextDir = "./tmp-context" contextDir = "tmp-context"
return contextDir return contextDir
} }
\ No newline at end of file
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