Commit 6a999616 authored by illsilin's avatar illsilin
Browse files

fix multi-line syntax issues

parent 31a0516b
......@@ -213,6 +213,8 @@ def cmake_build(Map conf=[:]){
if (setup_args.contains("gfx94")){
invocation_tag="gfx94"
}
echo "invocation tag: ${invocation_tag}"
if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") {
def redis_pre_setup_cmd = pre_setup_cmd + """
#!/bin/bash
......@@ -263,17 +265,23 @@ def cmake_build(Map conf=[:]){
echo cmd
if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") {
try {
def cmd1 = conf.get("cmd1", """${redis_pre_setup_cmd}""")
def cmd1 = conf.get("cmd1", """
${redis_pre_setup_cmd}
""")
sh cmd1
}
catch(Exception err){
echo "could not connect to redis server: ${err.getMessage()}. using local sccache."
def cmd2 = conf.get("cmd2", """${local_pre_setup_cmd}""")
def cmd2 = conf.get("cmd2", """
${local_pre_setup_cmd}
""")
sh cmd2
}
}
else{
def cmd3 = conf.get("cmd3", """${pre_setup_cmd}""")
def cmd3 = conf.get("cmd3", """
${pre_setup_cmd}
""")
sh cmd3
}
dir("build"){
......
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