From b31323bb4948c22e0e705f874ba8fd2cf3d3d043 Mon Sep 17 00:00:00 2001 From: Evert Daniel Romero Garrido Date: Wed, 15 Apr 2026 16:26:40 -0600 Subject: [PATCH] feat(pipeline): agrega approval gate manual para deploy a PROD - IT-240 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Agrega paso 06b_notify_approval para notificar por Telegram cuando el pipeline espera aprobación manual - Configura 07_deploy con deployment: production y trigger: manual - Actualiza mensaje final de Telegram para indicar que el deploy fue aprobado y completado --- bitbucket-pipelines.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 7e44ea0..e1a9dfd 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -210,9 +210,20 @@ pipelines: "${PROD_SERVER_USER_PROYECTOSACC:-thoth}@${PROD_SERVER_IP_PROYECTOSACC}" \ "bash -c 'mkdir -p /home/thoth/deploy/artifacts/current && aws s3 cp s3://${PROD_S3_ARTIFACTS_BUCKET}/main/proyectosacc-app.jar /home/thoth/deploy/artifacts/current/proyectosacc-app.jar && chown osiris:osiris /home/thoth/deploy/artifacts/current/proyectosacc-app.jar'" + - step: + name: 06b_notify_approval + script: + - set -euo pipefail + - export TELEGRAM_BOT_TOKEN="${PROD_TELEGRAM_BOT_TOKEN}" + - export TELEGRAM_CHAT_ID="${PROD_TELEGRAM_CHAT_ID}" + - | + bash scripts/telegram-pipeline-notify.sh start "⏸️ Pipeline pausado esperando aprobación manual para deploy a PRODUCCIÓN. Ve a Bitbucket > Pipelines > proyectosacc > master para aprobar o rechazar." + - step: name: 07_deploy oidc: true + deployment: production + trigger: manual script: - set -euo pipefail - source scripts/aws-oidc-setup.sh prod @@ -228,4 +239,4 @@ pipelines: - aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_DISTRIBUTION_ID}" --paths "/*" - export TELEGRAM_BOT_TOKEN="${PROD_TELEGRAM_BOT_TOKEN}" - export TELEGRAM_CHAT_ID="${PROD_TELEGRAM_CHAT_ID}" - - bash scripts/telegram-pipeline-notify.sh success "CloudFront invalidado" + - bash scripts/telegram-pipeline-notify.sh success "CloudFront invalidado | Deploy a PROD aprobado y completado"