diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index c157e5c..410e328 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -240,6 +240,17 @@ workflows: post-steps: - check_aws_version: version: "2.1.10" + - integration-test-install: + name: integration-test-skip-install-matched-version + context: [CPE_ORBS_AWS] + executor: arm + version: "2.1.21" + install_dir: "/usr/local/aws-cli" + binary_dir: "" + filters: *filters + post-steps: + - check_aws_version: + version: "2.1.21" - integration-test-install: name: integration-test-install-override-version-with-latest-<> context: [CPE_ORBS_AWS] @@ -269,7 +280,7 @@ workflows: pub_type: production enable_pr_comment: true context: orb-publisher - requires: [orb-tools/pack, test-install, test-install-version, test-install-override-version, integration-test-web-identity-with-profile, integration test web identity command with white spaces,integration-test-role-arn-config, test-install-override-version-with-latest] + requires: [orb-tools/pack, test-install, test-install-version, test-install-override-version, integration-test-web-identity-with-profile, integration test web identity command with white spaces,integration-test-role-arn-config, test-install-override-version-with-latest, integration-test-skip-install-matched-version] filters: *release-filters executors: terraform: diff --git a/src/scripts/install.sh b/src/scripts/install.sh index 4634c90..97ad778 100644 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -33,6 +33,9 @@ Toggle_Pager(){ if ! command -v aws >/dev/null 2>&1; then Install_AWS_CLI "${AWS_CLI_STR_AWS_CLI_VERSION}" +elif aws --version | awk '{print $2}' |grep "${AWS_CLI_STR_AWS_CLI_VERSION}"; then + echo "AWS CLI version ${AWS_CLI_STR_AWS_CLI_VERSION} already installed. Skipping installation" + exit 0 elif [ "$AWS_CLI_BOOL_OVERRIDE" -eq 1 ] || [ "${AWS_CLI_STR_AWS_CLI_VERSION}" != "latest" ]; then Uninstall_AWS_CLI Install_AWS_CLI "${AWS_CLI_STR_AWS_CLI_VERSION}"