Skip to content

Commit d034060

Browse files
committed
fix: update release process and image
Updated the release process to automatically infer the correct version from the `VERSION` variable in the `Makefile`. Updated the image in the manifest to reflect the current version in the code.
1 parent d453b64 commit d034060

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
VERSION ?= v0.1.0
22
GO_CONTAINER_IMAGE ?= docker.io/golang:1.25.3
33

4+
# Set this to non-empty when building and pushing a release.
5+
RELEASE ?=
6+
47
CONTAINER_RUNTIME ?= $(shell command -v podman 2>/dev/null || command -v docker 2>/dev/null)
58
ifeq ($(CONTAINER_RUNTIME),)
69
$(error No container runtime found. Please install podman or docker)
@@ -9,9 +12,9 @@ endif
912
GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
1013

1114
# Container image configuration.
12-
IMAGE_REGISTRY ?= localhost
15+
IMAGE_REGISTRY ?= ghcr.io/oxidecomputer
1316
IMAGE_NAME ?= oxide-cloud-controller-manager
14-
IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))-$(GIT_COMMIT_SHORT)
17+
IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))$(if $(RELEASE),,-$(GIT_COMMIT_SHORT))
1518
IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TAG)
1619

1720
.PHONY: test
@@ -40,10 +43,5 @@ build:
4043

4144
.PHONY: push
4245
push:
43-
@if [ -z "$(IMAGE_REGISTRY)" ]; then \
44-
echo "Error: IMAGE_REGISTRY must be set to push images"; \
45-
echo "Example: make image-push IMAGE_REGISTRY=ghcr.io/oxidecomputer"; \
46-
exit 1; \
47-
fi
4846
@echo "Pushing container image: $(IMAGE_FULL)"
4947
$(CONTAINER_RUNTIME) push $(IMAGE_FULL)

README.adoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,28 @@ The release process is manual and runs from a developer's workstation for now.
109109

110110
. Check out the revision to be released. Ensure the working copy is clean.
111111

112-
. Build the container image using the correct image registry and tag.
112+
. Build the container image.
113113
+
114114
[source,shell]
115115
----
116-
IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make build
116+
RELEASE=true make build
117117
----
118118

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

126-
. Bump the `VERSION` within the `Makefile` to the next version.
126+
. Create a GitHub release.
127+
128+
.. Create and push a Git tag with the v-prefixed `VERSION` (e.g., v0.1.0).
129+
130+
.. Create the GitHub release for the newly pushed tag. Automatically generate the release notes.
131+
132+
. Open a pull request with the following changes.
133+
134+
.. Update the `VERSION` within the `Makefile` to the next version.
135+
136+
.. Update the image tag within `manifests/oxide-cloud-controller-manager.yaml`.

manifests/oxide-cloud-controller-manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- key: "node-role.kubernetes.io/control-plane"
2828
effect: NoSchedule
2929
containers:
30-
- image: docker.io/sudomateo/oxide-cloud-controller-manager:latest
30+
- image: ghcr.io/oxidecomputer/oxide-cloud-controller-manager:0.1.0
3131
name: oxide-cloud-controller-manager
3232
command:
3333
- "/usr/bin/oxide-cloud-controller-manager"

0 commit comments

Comments
 (0)