Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • A Ahad Mobile
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • holatech
  • Ahad Mobile
  • Merge requests
  • !76

ci: deploy staging to localstack from the pipeline

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Khanh Pham requested to merge ci/staging-localstack-deploy into develop Sep 24, 2026
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 2

Summary

Adds deploy:staging (.gitlab/ci/staging.yml): on develop, runner #13 (holapc-staging) builds be and admin from the pipeline's clone, pushes them to LocalStack's ECR (localhost.localstack.cloud:4510), and runs infra/runtime/deploy.sh staging <short sha> — secrets from LocalStack Secrets Manager, migrations, health + public endpoint checks, image rollback on failure.

Replaces the jobs dropped in !74 (merged). Step S11 of the infra plan.

  • Needs be:build + admin:build only; resource_group: staging.
  • Skips the push when the tag already exists (ECR repos are IMMUTABLE), so a retried job does not fail.
  • The shell executor feeds the job script on stdin; nothing in the job reads stdin (docker run without -i, deploy.sh < /dev/null). Without that, the first docker run -i swallowed the rest of the script and the job went green after docker login.

Verification

  • Ran the job script by hand on holapc from a clean develop clone (37474e41): built + pushed both images, No migrations are pending, both containers healthy, public endpoints answer; staging now serves 37474e41.
  • Tag-exists check: describe-images rc 0 for an existing tag, 254 for a missing one.

After merge

Runner #13 is paused (since !74 (merged)) — unpause it, or this job sits pending.

🤖 Generated with Claude Code

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ci/staging-localstack-deploy