Commit a7d426a6 authored by illsilin's avatar illsilin
Browse files

fix groovy syntax

parent 3a78d556
...@@ -213,9 +213,8 @@ def cmake_build(Map conf=[:]){ ...@@ -213,9 +213,8 @@ def cmake_build(Map conf=[:]){
if (setup_args.contains("gfx94")){ if (setup_args.contains("gfx94")){
invocation_tag="gfx94" invocation_tag="gfx94"
} }
local_pre_setup_cmd = pre_setup_cmd
if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") { if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") {
redis_pre_setup_cmd = pre_setup_cmd + """ def redis_pre_setup_cmd = pre_setup_cmd + """
#!/bin/bash #!/bin/bash
export ROCM_PATH=/opt/rocm export ROCM_PATH=/opt/rocm
export SCCACHE_ENABLED=true export SCCACHE_ENABLED=true
...@@ -231,7 +230,7 @@ def cmake_build(Map conf=[:]){ ...@@ -231,7 +230,7 @@ def cmake_build(Map conf=[:]){
stunnel ../script/redis-cli.conf stunnel ../script/redis-cli.conf
../script/sccache_wrapper.sh --enforce_redis ../script/sccache_wrapper.sh --enforce_redis
""" """
local_pre_setup_cmd = pre_setup_cmd + """ def local_pre_setup_cmd = pre_setup_cmd + """
#!/bin/bash #!/bin/bash
export ROCM_PATH=/opt/rocm export ROCM_PATH=/opt/rocm
export SCCACHE_ENABLED=true export SCCACHE_ENABLED=true
...@@ -262,12 +261,17 @@ def cmake_build(Map conf=[:]){ ...@@ -262,12 +261,17 @@ def cmake_build(Map conf=[:]){
""") """)
echo cmd echo cmd
try { if(check_host() && params.USE_SCCACHE && "${env.CK_SCCACHE}" != "null" && "${invocation_tag}" != "") {
sh "${redis_pre_setup_cmd}" try {
sh """${redis_pre_setup_cmd}"""
}
catch(err){
echo "could not connect to redis server. using local sccache."
sh """${local_pre_setup_cmd}"""
}
} }
catch(err){ else{
echo "could not connect to redis server. using local sccache." sh """${pre_setup_cmd}"""
sh "${local_pre_setup_cmd}"
} }
sh cmd sh cmd
......
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