From 98515b046b6846a9941bffbf91b517d58eb7f92b Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Thu, 20 Jul 2023 14:59:19 +0800 Subject: [PATCH] use set +e --- .github/workflows/compatibility-test.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml index 4113432..ae52181 100644 --- a/.github/workflows/compatibility-test.yml +++ b/.github/workflows/compatibility-test.yml @@ -23,14 +23,13 @@ jobs: run: | # delete cluster if exists set +e - result=`ticloud cluster list 1372813089206721319 -o json` + ticloud cluster list 1372813089206721319 -o json > cluster exitcode="$?" if [[ "$exitcode" != "0" ]]; then - echo $result + cat cluster exit "$exitcode" fi - echo $result > cluster total=$(jq '.total' cluster); for i in $(seq 1 $total); do @@ -52,14 +51,13 @@ jobs: fi # get connection info - result=`ticloud cluster list 1372813089206721319 -o json` + ticloud cluster list 1372813089206721319 -o json > cluster exitcode="$?" if [[ "$exitcode" != "0" ]]; then - echo $result + cat cluster exit "$exitcode" fi - echo $result > cluster cat cluster echo "TIDB_CLOUD_USER=$(jq '.items[0].status.connection_strings.default_user' cluster)" >> $GITHUB_ENV echo "TIDB_CLOUD_HOST=$(jq '.items[0].status.connection_strings.standard.host' cluster)" >> $GITHUB_ENV