Skip to content

Commit 85156de

Browse files
Unify Release Process
Now, we are releasing one file olmv1.yaml and the installer The action will release the binaries and images for both projects
1 parent 0240649 commit 85156de

File tree

11 files changed

+74
-154
lines changed

11 files changed

+74
-154
lines changed

.goreleaser.yml

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,30 @@ before:
44
- go mod download
55
builds:
66
- id: operator-controller
7-
main: ./cmd/manager/
8-
binary: manager
7+
main: ./cmd/operator-controller/
8+
binary: operator-controller
99
asmflags: "{{ .Env.GO_BUILD_ASMFLAGS }}"
1010
gcflags: "{{ .Env.GO_BUILD_GCFLAGS }}"
1111
ldflags: "{{ .Env.GO_BUILD_LDFLAGS }}"
1212
tags:
13-
- "{{ .Env.GO_BUILD_TAGS }}"
13+
- "{{ .Env.GO_BUILD_TAGS }}"
14+
mod_timestamp: "{{ .CommitTimestamp }}"
15+
goos:
16+
- linux
17+
goarch:
18+
- amd64
19+
- arm64
20+
- ppc64le
21+
- s390x
22+
- id: catalogd
23+
main: ./catalogd/cmd/catalogd/
24+
binary: catalogd
25+
asmflags: "{{ .Env.GO_BUILD_ASMFLAGS }}"
26+
gcflags: "{{ .Env.GO_BUILD_GCFLAGS }}"
27+
ldflags: "{{ .Env.GO_BUILD_LDFLAGS }}"
28+
tags:
29+
- "{{ .Env.GO_BUILD_TAGS }}"
30+
mod_timestamp: "{{ .CommitTimestamp }}"
1431
goos:
1532
- linux
1633
goarch:
@@ -20,44 +37,82 @@ builds:
2037
- s390x
2138
dockers:
2239
- image_templates:
23-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
40+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
2441
dockerfile: Dockerfile
2542
goos: linux
2643
goarch: amd64
2744
use: buildx
2845
build_flag_templates:
2946
- "--platform=linux/amd64"
3047
- image_templates:
31-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
48+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
3249
dockerfile: Dockerfile
3350
goos: linux
3451
goarch: arm64
3552
use: buildx
3653
build_flag_templates:
3754
- "--platform=linux/arm64"
3855
- image_templates:
39-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
56+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
4057
dockerfile: Dockerfile
4158
goos: linux
4259
goarch: ppc64le
4360
use: buildx
4461
build_flag_templates:
4562
- "--platform=linux/ppc64le"
4663
- image_templates:
47-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
64+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
4865
dockerfile: Dockerfile
4966
goos: linux
5067
goarch: s390x
5168
use: buildx
5269
build_flag_templates:
5370
- "--platform=linux/s390x"
71+
- image_templates:
72+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
73+
dockerfile: catalogd/Dockerfile
74+
goos: linux
75+
goarch: amd64
76+
use: buildx
77+
build_flag_templates:
78+
- "--platform=linux/amd64"
79+
- image_templates:
80+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
81+
dockerfile: catalogd/Dockerfile
82+
goos: linux
83+
goarch: arm64
84+
use: buildx
85+
build_flag_templates:
86+
- "--platform=linux/arm64"
87+
- image_templates:
88+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
89+
dockerfile: catalogd/Dockerfile
90+
goos: linux
91+
goarch: ppc64le
92+
use: buildx
93+
build_flag_templates:
94+
- "--platform=linux/ppc64le"
95+
- image_templates:
96+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
97+
dockerfile: catalogd/Dockerfile
98+
goos: linux
99+
goarch: s390x
100+
use: buildx
101+
build_flag_templates:
102+
- "--platform=linux/s390x"
54103
docker_manifests:
55-
- name_template: "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}"
104+
- name_template: "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}"
105+
image_templates:
106+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
107+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
108+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
109+
- "{{ .Env.OPERATOR_CONTROLLER_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
110+
- name_template: "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}"
56111
image_templates:
57-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
58-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
59-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
60-
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
112+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-amd64"
113+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
114+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
115+
- "{{ .Env.CATALOGD_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
61116
checksum:
62117
name_template: 'checksums.txt'
63118
snapshot:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM gcr.io/distroless/static:nonroot
55

66
WORKDIR /
77

8-
COPY manager manager
8+
COPY operator-controller operator-controller
99

1010
EXPOSE 8080
1111

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export GO_BUILD_FLAGS :=
284284
export GO_BUILD_LDFLAGS := -s -w \
285285
-X '$(VERSION_PATH).version=$(VERSION)' \
286286

287-
BINARIES=manager
287+
BINARIES=operator-controller
288288

289289
$(BINARIES):
290290
go build $(GO_BUILD_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$@ ./cmd/$@
@@ -325,7 +325,7 @@ export GORELEASER_ARGS
325325

326326
.PHONY: release
327327
release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By default, this will run only as a snapshot and will not publish any artifacts unless it is run with different arguments. To override the arguments, run with "GORELEASER_ARGS=...". When run as a github action from a tag, this target will publish a full release.
328-
$(GORELEASER) $(GORELEASER_ARGS)
328+
OPERATOR_CONTROLLER_IMAGE_REPO=$(IMAGE_REPO) CATALOGD_IMAGE_REPO=$(CATALOG_IMAGE_REPO) $(GORELEASER) $(GORELEASER_ARGS)
329329

330330
.PHONY: quickstart
331331
quickstart: export MANIFEST := ./operator-controller.yaml

catalogd/.goreleaser.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

catalogd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Refer to https://github.com/GoogleContainerTools/distroless for more details
33
FROM gcr.io/distroless/static:nonroot
44
WORKDIR /
5-
COPY manager .
5+
COPY catalogd catalogd
66
USER 65532:65532
77

88
ENTRYPOINT ["/manager"]

catalogd/Makefile

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ post-upgrade-checks: $(GINKGO)
147147

148148
##@ Build
149149

150-
BINARIES=manager
150+
BINARIES=catalogd
151151
LINUX_BINARIES=$(join $(addprefix linux/,$(BINARIES)), )
152152

153153
# Build info
@@ -241,26 +241,6 @@ cert-manager:
241241
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MGR_VERSION}/cert-manager.yaml
242242
kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-webhook --timeout=60s
243243

244-
##@ Release
245-
246-
ifeq ($(origin ENABLE_RELEASE_PIPELINE), undefined)
247-
ENABLE_RELEASE_PIPELINE := false
248-
endif
249-
export ENABLE_RELEASE_PIPELINE
250-
251-
ifeq ($(origin GORELEASER_ARGS), undefined)
252-
GORELEASER_ARGS := --snapshot --clean
253-
endif
254-
255-
release: $(GORELEASER) ## Runs goreleaser for catalogd. By default, this will run only as a snapshot and will not publish any artifacts unless it is run with different arguments. To override the arguments, run with "GORELEASER_ARGS=...". When run as a github action from a tag, this target will publish a full release.
256-
$(GORELEASER) $(GORELEASER_ARGS)
257-
258-
quickstart: export MANIFEST := https://github.com/operator-framework/catalogd/releases/download/$(VERSION)/catalogd.yaml
259-
quickstart: export DEFAULT_CATALOGS := https://github.com/operator-framework/catalogd/releases/download/$(VERSION)/default-catalogs.yaml
260-
quickstart: $(KUSTOMIZE) generate ## Generate the installation release manifests and scripts
261-
$(KUSTOMIZE) build $(KUSTOMIZE_OVERLAY) | sed "s/:devel/:$(GIT_VERSION)/g" | sed "s/cert-git-version/cert-$(GIT_VERSION)/g" > catalogd.yaml
262-
envsubst '$$CERT_MGR_VERSION,$$MANIFEST,$$DEFAULT_CATALOGS' < scripts/install.tpl.sh > install.sh
263-
264244
.PHONY: demo-update
265245
demo-update:
266246
hack/scripts/generate-asciidemo.sh

catalogd/RELEASING.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

catalogd/config/base/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
type: RuntimeDefault
5252
containers:
5353
- command:
54-
- ./manager
54+
- ./catalogd
5555
args:
5656
- --leader-elect
5757
- --metrics-bind-address=:7443

0 commit comments

Comments
 (0)