Commit Graph

13 Commits

Author SHA1 Message Date
Amelia (Dev Agent) 3597ba89e5 fix(pipeline): hacer pasos de build y deploy condicionales
El repositorio proyectosacc actualmente solo contiene infraestructura
(Terraform, scripts, nginx). El código de la aplicación se agregará
en el futuro. Este cambio hace que los pasos 04_build, 05_publish,
06_install y 07_deploy verifiquen la existencia de archivos de
aplicación antes de ejecutar npm/gradle/aws s3/ssh, evitando
fallos del pipeline cuando no hay código que compilar o desplegar.
2026-04-16 15:26:59 -06:00
Evert Daniel Romero Garrido b338e68852 fix: revert step-level oidc to simple true for parsing compatibility 2026-04-16 13:06:54 -06:00
Evert Daniel Romero Garrido 7f8f531172 fix: move oidc audiences to options and step level per Atlassian docs 2026-04-16 12:30:51 -06:00
Evert Daniel Romero Garrido c9c34a4328 fix: mover oidc audiences a definitions para corregir Incorrect token audience 2026-04-16 12:05:49 -06:00
Evert Daniel Romero Garrido e21fddf41b fix(pipeline): remove obsolete 02_repo-config step cloning non-existent repos
Removes cloning of ccsoft1/ci-cd-commons and ccsoft1/ci-cd-saac4

from both developer and master branch pipelines. proyectosacc is now

self-contained with local scripts and terraform code.
2026-04-16 11:00:24 -06:00
Evert Daniel Romero Garrido 0be9efe1b3 fix(ci): install AWS CLI v2 manually on Ubuntu 24.04 2026-04-16 10:39:43 -06:00
Evert Daniel Romero Garrido b31323bb49 feat(pipeline): agrega approval gate manual para deploy a PROD - IT-240
- 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
2026-04-15 16:26:40 -06:00
Evert Daniel Romero Garrido 0c0126f3de feat(pipeline): implementa notificaciones enriquecidas de Telegram para IT-238
- Crea scripts/telegram-pipeline-notify.sh con detalles de branch, commit, build y autor
- Actualiza bitbucket-pipelines.yml para usar notificaciones locales en todos los ambientes
- Corrige bug donde 01_image-setup referenciaba ci-cd-commons antes de clonarlo
- Usa formato MarkdownV2 para mensajes en Telegram
2026-04-15 16:07:54 -06:00
Evert Daniel Romero Garrido 744c5d1413 feat(iam): implementa autenticación OIDC entre Bitbucket Pipelines y AWS
- Agrega aws_iam_openid_connect_provider y roles IAM para DEV/PROD
- Actualiza bitbucket-pipelines.yml para usar OIDC en steps 03, 05, 07
- Crea script helper scripts/aws-oidc-setup.sh
- Agrega provider tls en terraform/provider.tf
- Documenta el flujo completo en docs/14-oidc-bitbucket-aws.md

Elimina la dependencia de AWS_ACCESS_KEY_ID y AWS_SECRET_ACCESS_KEY
estáticos en el pipeline, permitiendo autenticación sin credenciales
de larga vida via AssumeRoleWithWebIdentity.

Refs: cuenta DEV 668889063715, PROD 523761210517
2026-04-15 12:50:31 -06:00
Evert Daniel Romero Garrido cbea3e932b feat(ci): integra Terraform en pipeline de Bitbucket Pipelines
- Agrega paso 03_terraform para DEV y PROD con init, plan y apply
- Crea backend.dev.hcl para configuración explícita de estado DEV
- Refactoriza Route53/ACM en main.tf para soportar PROD cross-account
  usando count condicional sin romper estado de DEV
- Descomenta provider aws.route53 en provider.tf
- Añade domain_name faltante en prod.tfvars y confirma dev.tfvars
- Corrige output route53_record para recursos con count
- Elimina errored.tfstate corrupto local
- Incluye permiso sts:AssumeRole en IAM policy para Route53 cross-account
2026-04-14 19:40:57 -06:00
Evert Daniel Romero Garrido 3fe8cb1391 chore(ci): fix S3 artifacts bucket references in install step and secure terraform tfvars
- Use DEV_S3_ARTIFACTS_BUCKET and PROD_S3_ARTIFACTS_BUCKET in 06_install
  instead of generic S3_ARTIFACTS_BUCKET to prevent cross-env reads
- Add terraform/environments/*.tfvars to .gitignore to prevent secret leaks
- Update prod backend state bucket name to proyectosacc-specific bucket
- Add CI/CD credential policy documentation
2026-04-14 16:01:30 -06:00
Evert Daniel Romero Garrido 2cdeee0b84 chore(ci): update pipeline to use env-prefixed S3 bucket variables
Aligns bitbucket-pipelines.yml with CCsoft CI/CD convention
<Env>_S3_FRONTEND_BUCKET and <Env>_S3_ARTIFACTS_BUCKET.
Branches already use master/developer.
2026-04-14 15:31:18 -06:00
Evert Daniel Romero Garrido 85297b12a2 Initial commit: Terraform infrastructure, pipelines, docs and scripts 2026-04-14 14:53:05 -06:00