From 18b436e582456581fc62812553f9e1317cf54682 Mon Sep 17 00:00:00 2001 From: Evert Daniel Romero Garrido Date: Thu, 16 Apr 2026 11:42:54 -0600 Subject: [PATCH] fix(oidc): install AWS CLI v2 inside aws-oidc-setup.sh if missing --- scripts/aws-oidc-setup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/aws-oidc-setup.sh b/scripts/aws-oidc-setup.sh index 06b5038..1d7e2c1 100755 --- a/scripts/aws-oidc-setup.sh +++ b/scripts/aws-oidc-setup.sh @@ -11,12 +11,20 @@ # # Requiere: # - El step de bitbucket-pipelines.yml debe tener "oidc: true" -# - AWS CLI v2 instalado # - python3 disponible para parsear JSON # =============================================================================================================== set -euo pipefail +if ! command -v aws &> /dev/null; then + echo "AWS CLI no encontrado. Instalando AWS CLI v2..." + curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip -q awscliv2.zip + ./aws/install --update + rm -rf awscliv2.zip aws + aws --version +fi + ENV="${1:-dev}" if [[ -z "${BITBUCKET_STEP_OIDC_TOKEN:-}" ]]; then