diff --git a/Makefile b/Makefile index 846be37..6a50384 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ endif GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown") # Container image configuration. -IMAGE_REGISTRY ?= ghcr.io/oxidecomputer +IMAGE_REGISTRY ?= localhost IMAGE_NAME ?= oxide-cloud-controller-manager IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))-$(GIT_COMMIT_SHORT) IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TAG) @@ -18,10 +18,11 @@ IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TA test: @echo "Running tests in container..." $(CONTAINER_RUNTIME) build \ + --file Containerfile \ --build-arg GO_CONTAINER_IMAGE=$(GO_CONTAINER_IMAGE) \ --build-arg VERSION=$(VERSION) \ --target builder \ - -t $(IMAGE_NAME)-builder:$(IMAGE_TAG) \ + --tag $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME)-builder:$(IMAGE_TAG) \ . $(CONTAINER_RUNTIME) run --rm $(IMAGE_NAME)-builder:$(IMAGE_TAG) go test -v ./... @@ -29,9 +30,12 @@ test: build: @echo "Building container image: $(IMAGE_FULL)" $(CONTAINER_RUNTIME) build \ + --file Containerfile \ --build-arg GO_CONTAINER_IMAGE=$(GO_CONTAINER_IMAGE) \ --build-arg VERSION=$(VERSION) \ - -t $(IMAGE_FULL) \ + --annotation org.opencontainers.image.description='Oxide Cloud Controller Manager' \ + --annotation org.opencontainers.image.source=https://github.com/oxidecomputer/oxide-cloud-controller-manager \ + --tag $(IMAGE_FULL) \ . .PHONY: push diff --git a/README.adoc b/README.adoc index 1c03360..32a37cf 100644 --- a/README.adoc +++ b/README.adoc @@ -102,3 +102,25 @@ podman run \ --cloud-provider oxide \ --kubeconfig /tmp/kubeconfig.yaml ---- + +== Release Process + +The release process is manual and runs from a developer's workstation for now. + +. Check out the revision to be released. Ensure the working copy is clean. + +. Build the container image using the correct image registry and tag. ++ +[source,shell] +---- +IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make build +---- + +. Push the container image using to correct image registry. ++ +[source,shell] +---- +IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make push +---- + +. Bump the `VERSION` within the `Makefile` to the next version.