blumeops/mise-tasks/container-tag-and-release
Erich Blume d6e6b48f6a Migrate registry to Caddy (registry.ops.eblu.me) (#58)
## Summary
- Update all references from `registry.tail8d86e.ts.net` to `registry.ops.eblu.me`
- Remove `tailscale_serve` ansible role (no longer needed - all services migrated to Caddy)
- Update minikube containerd config for new registry URL
- Update devpi manifest, CI actions, and mise tasks

## Deployment and Testing
- [ ] Run `mise run provision-indri -- --check --diff` (dry run)
- [ ] Run `mise run provision-indri -- --tags minikube` to update containerd config
- [ ] Sync devpi ArgoCD app: `argocd app sync devpi`
- [ ] Manually remove old Tailscale serve entry: `ssh indri 'tailscale serve --service=svc:registry off'`
- [ ] Test registry access: `curl https://registry.ops.eblu.me/v2/_catalog`
- [ ] Run `mise run indri-services-check` to verify all services healthy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/58
2026-01-25 12:06:15 -08:00

74 lines
1.8 KiB
Bash
Executable file

#!/usr/bin/env bash
#MISE description="Release a container image by creating a git tag"
set -euo pipefail
CONTAINER="${1:-}"
VERSION="${2:-}"
if [[ -z "$CONTAINER" || -z "$VERSION" ]]; then
echo "Usage: mise run container-tag-and-release <container> <version>"
echo ""
echo "Run 'mise run container-list' to see available containers and recent tags."
exit 1
fi
# Validate version format
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version must be in format vX.Y.Z (e.g. v1.0.0)"
exit 1
fi
TAG="${CONTAINER}-${VERSION}"
echo "Creating release tag: $TAG"
echo ""
# Check if tag already exists
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Error: Tag '$TAG' already exists"
echo "Existing tags for $CONTAINER:"
git tag -l "${CONTAINER}-v*" | sort -V | tail -5
exit 1
fi
# Check if container directory exists
CONTAINER_DIR="containers/${CONTAINER}"
if [[ ! -f "$CONTAINER_DIR/Dockerfile" ]]; then
echo "Error: No Dockerfile found at '$CONTAINER_DIR/Dockerfile'"
echo ""
echo "Available containers:"
for dir in containers/*/; do
[[ -d "$dir" ]] && echo " - $(basename "$dir")"
done
exit 1
fi
# Image name follows convention: blumeops/<container>
IMAGE="blumeops/${CONTAINER}"
echo "Container: $CONTAINER"
echo "Directory: $CONTAINER_DIR"
echo "Image: registry.ops.eblu.me/$IMAGE:$VERSION"
echo ""
# Confirm
read -p "Create tag and push? [y/N] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 0
fi
# Create and push tag
git tag "$TAG"
git push origin "$TAG"
echo ""
echo "Tag '$TAG' created and pushed"
echo ""
echo "The workflow will now build and push:"
echo " registry.ops.eblu.me/$IMAGE:$VERSION"
echo ""
echo "Monitor the build at:"
echo " https://forge.ops.eblu.me/eblume/blumeops/actions"