fix: add escape character to fix syntax error

This commit is contained in:
tangfangzhi 2022-06-02 14:43:05 +08:00
parent 53f53fe9c9
commit d64c0e4dd0
1 changed files with 4 additions and 2 deletions

View File

@ -283,7 +283,7 @@ def run_win_test() {
time /t time /t
cd C:\\workspace\\%EXECUTOR_NUMBER%\\TDinternal\\community\\tests\\system-test cd C:\\workspace\\%EXECUTOR_NUMBER%\\TDinternal\\community\\tests\\system-test
echo "testing ..." echo "testing ..."
test-all.bat "{\"host\":\"''' + linux_node_ip + '''\",\"port\":22,\"user\":\"root\",\"password\":\"''' + linux_node_pass + '''\",\"path\":\"/var/lib/jenkins/workspace/TDinternal\"}" test-all.bat "{\\\"host\\\":\\\"''' + linux_node_ip + '''\\\",\\\"port\\\":22,\\\"user\\\":\\\"root\\\",\\\"password\\\":\\\"''' + linux_node_pass + '''\\\",\\\"path\\\":\\\"/var/lib/jenkins/workspace/TDinternal\\\"}"
time /t time /t
''' '''
} }
@ -337,13 +337,16 @@ pipeline {
script: 'jq .password /home/node_info.json | sed "s/\\\"//g"', script: 'jq .password /home/node_info.json | sed "s/\\\"//g"',
returnStdout: true returnStdout: true
).trim() ).trim()
echo "${linux_node_ip}:${linux_node_pass}"
} }
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 40, unit: 'MINUTES'){ timeout(time: 40, unit: 'MINUTES'){
pre_test()
script { script {
sh ''' sh '''
date date
rm -rf ${WKC}/debug rm -rf ${WKC}/debug
cd ${WKC}/tests/parallel_test
time ./container_build.sh -w ${WKDIR} -t 8 -e time ./container_build.sh -w ${WKDIR} -t 8 -e
rm -f /tmp/cases.task rm -f /tmp/cases.task
./collect_cases.sh -e ./collect_cases.sh -e
@ -359,7 +362,6 @@ pipeline {
} }
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 15, unit: 'MINUTES'){ timeout(time: 15, unit: 'MINUTES'){
pre_test()
script { script {
sh ''' sh '''
echo "packaging ..." echo "packaging ..."