From 34dab536a3b62e1d36bca33a18cb103d927116d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Chien Date: Mon, 22 Nov 2021 15:38:39 -0500 Subject: [PATCH] Suppressed the exit code in case the document doesn't exist. (#763) --- .github/workflows/CI.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d377c057af..5ab840fd57 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -534,15 +534,12 @@ jobs: - name: Create SSM package run: | ssm_pkg_version=`cat build/packages/VERSION` - aws ssm describe-document --name "testAWSDistroOTel-Collector" --version-name ${ssm_pkg_version} >/dev/null 2>&1 - if [ $? -ne 0 ]; then + (aws ssm describe-document --name "testAWSDistroOTel-Collector" --version-name ${ssm_pkg_version} >/dev/null 2>&1) || { pip3 install boto3 python3 tools/ssm/ssm_manifest.py ${ssm_pkg_version} aws s3 cp build/packages/ssm s3://aws-otel-collector-test/ssm/${ssm_pkg_version} --recursive python3 tools/ssm/ssm_create.py --no-default testAWSDistroOTel-Collector ${ssm_pkg_version} aws-otel-collector-test/ssm/${ssm_pkg_version} us-west-2 - else - echo "SSM package ($ssm_pkg_version) already exists" - fi + } - name: Upload to S3 in the testing stack if: steps.e2etest-release.outputs.cache-hit != 'true'