Skip to content

Commit d453b64

Browse files
authored
feat: document release process (#145)
Documented the release process for building and pushing the container image to the image registry.
1 parent 95b02fd commit d453b64

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99
GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
1010

1111
# Container image configuration.
12-
IMAGE_REGISTRY ?= ghcr.io/oxidecomputer
12+
IMAGE_REGISTRY ?= localhost
1313
IMAGE_NAME ?= oxide-cloud-controller-manager
1414
IMAGE_TAG ?= $(patsubst v%,%,$(VERSION))-$(GIT_COMMIT_SHORT)
1515
IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TAG)
@@ -18,20 +18,24 @@ IMAGE_FULL ?= $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME):$(IMAGE_TA
1818
test:
1919
@echo "Running tests in container..."
2020
$(CONTAINER_RUNTIME) build \
21+
--file Containerfile \
2122
--build-arg GO_CONTAINER_IMAGE=$(GO_CONTAINER_IMAGE) \
2223
--build-arg VERSION=$(VERSION) \
2324
--target builder \
24-
-t $(IMAGE_NAME)-builder:$(IMAGE_TAG) \
25+
--tag $(if $(IMAGE_REGISTRY),$(IMAGE_REGISTRY)/)$(IMAGE_NAME)-builder:$(IMAGE_TAG) \
2526
.
2627
$(CONTAINER_RUNTIME) run --rm $(IMAGE_NAME)-builder:$(IMAGE_TAG) go test -v ./...
2728

2829
.PHONY: build
2930
build:
3031
@echo "Building container image: $(IMAGE_FULL)"
3132
$(CONTAINER_RUNTIME) build \
33+
--file Containerfile \
3234
--build-arg GO_CONTAINER_IMAGE=$(GO_CONTAINER_IMAGE) \
3335
--build-arg VERSION=$(VERSION) \
34-
-t $(IMAGE_FULL) \
36+
--annotation org.opencontainers.image.description='Oxide Cloud Controller Manager' \
37+
--annotation org.opencontainers.image.source=https://github.com/oxidecomputer/oxide-cloud-controller-manager \
38+
--tag $(IMAGE_FULL) \
3539
.
3640

3741
.PHONY: push

README.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,25 @@ podman run \
102102
--cloud-provider oxide \
103103
--kubeconfig /tmp/kubeconfig.yaml
104104
----
105+
106+
== Release Process
107+
108+
The release process is manual and runs from a developer's workstation for now.
109+
110+
. Check out the revision to be released. Ensure the working copy is clean.
111+
112+
. Build the container image using the correct image registry and tag.
113+
+
114+
[source,shell]
115+
----
116+
IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make build
117+
----
118+
119+
. Push the container image using to correct image registry.
120+
+
121+
[source,shell]
122+
----
123+
IMAGE_REGISTRY=ghcr.io/oxidecomputer IMAGE_TAG=0.1.0 make push
124+
----
125+
126+
. Bump the `VERSION` within the `Makefile` to the next version.

0 commit comments

Comments
 (0)