Skip to content

feat(ci): build+push the worker image and register its artifact on release - #5

Merged
agustincelentano merged 2 commits into
mainfrom
feat/worker-image
Sep 9, 2026
Merged

feat(ci): build+push the worker image and register its artifact on release#5
agustincelentano merged 2 commits into
mainfrom
feat/worker-image

Conversation

@agustincelentano

@agustincelentano agustincelentano commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Qué es esto

Lleva services-dynamo-db al mismo modelo que services-s-3 (#20 de ese repo): en cada release se construye una imagen de worker, se publica en public.ecr.aws/nullplatform/services/dynamo-db:<tag> y se registra como artifact oci_image en nullplatform, con el tag como referencia.

Con eso una instalación puede correr el servicio como worker (package-exec) en lugar de clonar el repo dentro del pod del agent: el package pinea la imagen, el agent la levanta cuando llega una acción y la apaga cuando queda ociosa.

Qué cambia

  • Dockerfile, copia del de s3 con los paths de este servicio. Base worker-bridge:1.0.0, más aws-cli y gomplate de apk y OpenTofu 1.10.10 (el backend S3 del servicio usa use_lockfile=true, que necesita tofu 1.10+; alpine solo trae 1.7). Hornea el repo en /app/pkg y deja NP_PACKAGE_NAME=dynamodb, NP_SERVICE_PATH=/app/pkg/dynamodb y NP_SCOPE_ENTRYPOINT=/app/pkg/dynamodb/entrypoint/entrypoint. Los scripts del servicio solo llaman a aws, tofu, jq, np y curl, todos presentes.
  • .github/workflows/release.yml: pasa de release.yml a release-publish-oci.yml de actions-nullplatform con image_name: services/dynamo-db, igual que s3. Suma id-token: write para el push a ECR por OIDC y el workflow_dispatch con existing_tag para publicar un tag ya existente si un release falla a mitad.
  • .trivyignore: suprime AVD-DS-0002 (la imagen corre como root porque la base worker-bridge lo hace; el usuario lo gobierna el securityContext del pod del worker), con el mismo texto que en s3.

Verificado

Imagen construida localmente desde este branch: tofu 1.10.10, aws-cli 2.15.57, gomplate 3.11.7, jq 1.7.1 y np presentes, entrypoint ejecutable en la ruta que declara NP_SCOPE_ENTRYPOINT.

Antes de cortar el primer release

El workflow hace login y push a ECR pero no crea el repositorio: services/dynamo-db ya existe en ECR Public de nullplatform. AWS_ROLE_ARN_ECR_PUSH está en el repo; ARTIFACT_NP_API_KEY y NP_ARTIFACT_NRN llegan desde la organización.

…lease

Same pipeline as services-s-3: release-please -> docker build+push to
public.ecr.aws/nullplatform/services/dynamodb -> oci_image artifact
registered by tag -> release finalized with the artifact metadata.

The Dockerfile builds on worker-bridge 1.0.0 with aws-cli, gomplate and
OpenTofu 1.10 (use_lockfile=true needs 1.10+), bakes the service under
/app/pkg/dynamodb and points the bridge at its entrypoint.
Comment thread Dockerfile Dismissed
@agustincelentano
agustincelentano merged commit add027e into main Sep 9, 2026
6 checks passed
@agustincelentano
agustincelentano deleted the feat/worker-image branch September 9, 2026 16:55
@github-actions github-actions Bot mentioned this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants