Add nettest container for CI/CD network debugging (#52)
Some checks failed
Build Container / build (push) Failing after 18s

## Summary
- Add `containers/nettest/` with Alpine-based Dockerfile and connectivity test script
- Add `.forgejo/workflows/build-nettest.yaml` workflow triggered by `nettest-v*` tags
- Test script checks DNS resolution and HTTPS connectivity to forge and registry

## Deployment and Testing
- [ ] Merge PR to main
- [ ] Run `mise run container-release nettest v0.1.0` to trigger first build
- [ ] Verify workflow runs successfully and container can reach tailnet services
- [ ] Manually test from minikube: `kubectl run nettest --rm -it --image=registry.tail8d86e.ts.net/blumeops/nettest:v0.1.0`

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

Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/52
This commit is contained in:
Erich Blume 2026-01-24 16:54:35 -08:00
commit 31697b4d63
6 changed files with 239 additions and 78 deletions

View file

@ -4,32 +4,24 @@
set -euo pipefail
REGISTRY="registry.tail8d86e.ts.net"
WORKFLOW_DIR=".forgejo/workflows"
CONTAINER_DIR="containers"
echo "Container Images"
echo "================"
echo ""
# Find all build-*.yaml workflows
for workflow in "$WORKFLOW_DIR"/build-*.yaml; do
[[ -f "$workflow" ]] || continue
# Find all container directories with Dockerfiles
for dir in "$CONTAINER_DIR"/*/; do
[[ -d "$dir" ]] || continue
[[ -f "$dir/Dockerfile" ]] || continue
# Extract container name from filename: build-runner.yaml -> runner
filename=$(basename "$workflow")
container="${filename#build-}"
container="${container%.yaml}"
# Skip if not a container build workflow (check for image_name)
if ! grep -q "image_name:" "$workflow" 2>/dev/null; then
continue
fi
# Extract image name from workflow
image=$(grep -E "^\s+image_name:" "$workflow" | head -1 | awk '{print $2}')
# Extract container name from directory
container=$(basename "$dir")
image="blumeops/$container"
echo "📦 $container"
echo " Image: $REGISTRY/$image"
echo " Workflow: $workflow"
echo " Path: $dir"
# Query zot for recent tags
tags=$(curl -sf "https://$REGISTRY/v2/$image/tags/list" 2>/dev/null | jq -r '.tags // [] | .[]' | grep -E '^v[0-9]' | sort -V | tail -4 || true)
@ -47,7 +39,7 @@ done
echo "---"
echo "To release a new version:"
echo " mise run container-release <container> <version>"
echo " mise run container-tag-and-release <container> <version>"
echo ""
echo "Example:"
echo " mise run container-release runner v1.0.0"
echo " mise run container-tag-and-release nettest v1.0.0"

View file

@ -7,7 +7,7 @@ CONTAINER="${1:-}"
VERSION="${2:-}"
if [[ -z "$CONTAINER" || -z "$VERSION" ]]; then
echo "Usage: mise run container-release <container> <version>"
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
@ -32,24 +32,23 @@ if git rev-parse "$TAG" >/dev/null 2>&1; then
exit 1
fi
# Find the workflow file to determine image name
WORKFLOW_FILE=".forgejo/workflows/build-${CONTAINER}.yaml"
if [[ ! -f "$WORKFLOW_FILE" ]]; then
echo "Error: No workflow found for container '$CONTAINER'"
# 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 "Run 'mise run container-list' to see available containers."
echo "Available containers:"
for dir in containers/*/; do
[[ -d "$dir" ]] && echo " - $(basename "$dir")"
done
exit 1
fi
# Extract image name from workflow
IMAGE=$(grep -E "^\s+image_name:" "$WORKFLOW_FILE" | head -1 | awk '{print $2}')
if [[ -z "$IMAGE" ]]; then
echo "Error: Could not determine image name from $WORKFLOW_FILE"
exit 1
fi
# Image name follows convention: blumeops/<container>
IMAGE="blumeops/${CONTAINER}"
echo "Container: $CONTAINER"
echo "Workflow: $WORKFLOW_FILE"
echo "Directory: $CONTAINER_DIR"
echo "Image: registry.tail8d86e.ts.net/$IMAGE:$VERSION"
echo ""
@ -66,7 +65,7 @@ git tag "$TAG"
git push origin "$TAG"
echo ""
echo "Tag '$TAG' created and pushed"
echo "Tag '$TAG' created and pushed"
echo ""
echo "The workflow will now build and push:"
echo " registry.tail8d86e.ts.net/$IMAGE:$VERSION"