Skip to content

CORE-4588 - add deployment labels to docker image#155

Draft
monotek wants to merge 1 commit into
mainfrom
docker-labels
Draft

CORE-4588 - add deployment labels to docker image#155
monotek wants to merge 1 commit into
mainfrom
docker-labels

Conversation

@monotek

@monotek monotek commented Jul 10, 2026

Copy link
Copy Markdown
Member

Type of Change

  • Bugfix
  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

Deployment-tracking image labels + configurable metadata namespace

Adds deployment-tracking labels on the built Docker image, mirroring the existing GitOps manifest annotations, and makes both independently toggleable and their key namespace configurable.

What changed
  • New deployment-labels input (default true): stamps com.staffbase.deploy.repositoryFullName / commitSha / version onto the built image, using the same values as the annotations.
  • New deployment-annotations input (default true): the existing annotation behavior, now opt-out.
  • New deployment-domain input (default deploy.staffbase.com): single source of truth for the key namespace — applied verbatim to annotation keys (<domain>/…) and reversed to reverse-DNS for label keys (com.staffbase.deploy.…).
Implementation
  • reverse_domain helper in common.sh; dedicated generate-label-prefix.sh + step (keeps generate-tags.sh tag-only).
  • Labels gated per-line in the Build step expression; annotations gated in gitops-functions.sh.
Notes
  • Labels are baked in at build time, so release/custom retag runs keep the source branch build's labels.
  • 95/95 bats tests pass (+7), shellcheck clean.

Docs updated in README.md.

Checklist

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Review the Contributing Guideline and sign CLA
  • Reference relevant issue(s) and close them after merging

Signed-off-by: André Bauer <andre.bauer@staffbase.com>
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.

1 participant