Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
VERSION ?= v0.1.0
GO_CONTAINER_IMAGE ?= docker.io/golang:1.25.3

# Set this to non-empty when building and pushing a release.
RELEASE ?=

CONTAINER_RUNTIME ?= $(shell command -v podman 2>/dev/null || command -v docker 2>/dev/null)
ifeq ($(CONTAINER_RUNTIME),)
$(error No container runtime found. Please install podman or docker)
Expand All @@ -9,9 +12,9 @@ endif
GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")

# Container image configuration.
IMAGE_REGISTRY ?= localhost
IMAGE_REGISTRY ?= ghcr.io/oxidecomputer
IMAGE_NAME ?= oxide-cloud-controller-manager
IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))-$(GIT_COMMIT_SHORT)
IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))$(if $(RELEASE),,-$(GIT_COMMIT_SHORT))
IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TAG)

.PHONY: test
Expand Down Expand Up @@ -40,10 +43,5 @@ build:

.PHONY: push
push:
@if [ -z "$(IMAGE_REGISTRY)" ]; then \
echo "Error: IMAGE_REGISTRY must be set to push images"; \
echo "Example: make image-push IMAGE_REGISTRY=ghcr.io/oxidecomputer"; \
exit 1; \
fi
@echo "Pushing container image: $(IMAGE_FULL)"
$(CONTAINER_RUNTIME) push $(IMAGE_FULL)
20 changes: 15 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,28 @@ 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.
. Build the container image.
+
[source,shell]
----
IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make build
RELEASE=true make build
----

. Push the container image using to correct image registry.
. Push the container image.
+
[source,shell]
----
IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make push
RELEASE=true make push
----

. Bump the `VERSION` within the `Makefile` to the next version.
. Create a GitHub release.

.. Create and push a Git tag with the v-prefixed `VERSION` (e.g., v0.1.0).

.. Create the GitHub release for the newly pushed tag. Automatically generate the release notes.

. Open a pull request with the following changes.

.. Update the `VERSION` within the `Makefile` to the next version.

.. Update the image tag within `manifests/oxide-cloud-controller-manager.yaml`.
2 changes: 1 addition & 1 deletion manifests/oxide-cloud-controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
- key: "node-role.kubernetes.io/control-plane"
effect: NoSchedule
containers:
- image: docker.io/sudomateo/oxide-cloud-controller-manager:latest
- image: ghcr.io/oxidecomputer/oxide-cloud-controller-manager:0.1.0
name: oxide-cloud-controller-manager
command:
- "/usr/bin/oxide-cloud-controller-manager"
Expand Down