Commit d2aef7e0 authored by daidekun's avatar daidekun

fixbugs

parent 37c6446f
......@@ -66,6 +66,8 @@ def jsonParse(def json) {
def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName) {
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)
print "=====Build Command Is====="
configPath = res_json["configPath"]
......@@ -79,7 +81,7 @@ def build_nodejs_and_ui(namespace, systemName, contextDir, repoName, branchName)
def bowerFile = fileExists './bower.json'
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 {
sh buildCmd
sh 'tar zcf dist.tgz dist/'
......
......@@ -3,6 +3,6 @@ package org.qg;
def contextDir(workspace) {
uuid = UUID.randomUUID().toString()
contextDir = "./tmp-context"
contextDir = "tmp-context"
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