Skip to content

Commit 9854308

Browse files
Merge pull request #114 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents d39c8b0 + 049aa8b commit 9854308

File tree

2 files changed

+43
-33
lines changed

2 files changed

+43
-33
lines changed

klone.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,60 +9,60 @@ targets:
99
- folder_name: api-docs
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
12+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
1313
repo_path: modules/api-docs
1414
- folder_name: boilerplate
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
17+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
1818
repo_path: modules/boilerplate
1919
- folder_name: cert-manager
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
22+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
2323
repo_path: modules/cert-manager
2424
- folder_name: controller-gen
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
27+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
2828
repo_path: modules/controller-gen
2929
- folder_name: generate-verify
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
32+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
3333
repo_path: modules/generate-verify
3434
- folder_name: go
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
37+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
3838
repo_path: modules/go
3939
- folder_name: help
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
42+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
4343
repo_path: modules/help
4444
- folder_name: kind
4545
repo_url: https://github.com/cert-manager/makefile-modules.git
4646
repo_ref: main
47-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
47+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
4848
repo_path: modules/kind
4949
- folder_name: klone
5050
repo_url: https://github.com/cert-manager/makefile-modules.git
5151
repo_ref: main
52-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
52+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
5353
repo_path: modules/klone
5454
- folder_name: oci-build
5555
repo_url: https://github.com/cert-manager/makefile-modules.git
5656
repo_ref: main
57-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
57+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
5858
repo_path: modules/oci-build
5959
- folder_name: repository-base
6060
repo_url: https://github.com/cert-manager/makefile-modules.git
6161
repo_ref: main
62-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
62+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
6363
repo_path: modules/repository-base
6464
- folder_name: tools
6565
repo_url: https://github.com/cert-manager/makefile-modules.git
6666
repo_ref: main
67-
repo_hash: 9b0502fdd5860b18fd6a9ddf86f148604a214fe4
67+
repo_hash: 98c34c9f1a00f9be03d5020b46fccb21c6a566bd
6868
repo_path: modules/tools

make/_shared/tools/00_mod.mk

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ TOOLS += operator-sdk=v1.34.1
124124
# https://pkg.go.dev/github.com/cli/cli/v2?tab=versions
125125
TOOLS += gh=v2.47.0
126126
# https:///github.com/redhat-openshift-ecosystem/openshift-preflight/releases
127-
TOOLS += preflight=1.9.1
127+
TOOLS += preflight=1.9.2
128128

129129
# https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions
130130
K8S_CODEGEN_VERSION=v0.29.1
@@ -167,22 +167,11 @@ $(bin_dir)/scratch/%_VERSION: FORCE | $(bin_dir)/scratch
167167
# --retry-connrefused = retry even if the initial connection was refused
168168
CURL = curl --silent --show-error --fail --location --retry 10 --retry-connrefused
169169

170-
# In Prow, the pod has the folder "$(bin_dir)/downloaded" mounted into the
171-
# container. For some reason, even though the permissions are correct,
172-
# binaries that are mounted with hostPath can't be executed. When in CI, we
173-
# copy the binaries to work around that. Using $(LN) is only required when
174-
# dealing with binaries. Other files and folders can be symlinked.
175-
#
176-
# Details on how "$(bin_dir)/downloaded" gets cached are available in the
177-
# description of the PR https://github.com/jetstack/testing/pull/651.
178-
#
179-
# We use "printenv CI" instead of just "ifeq ($(CI),)" because otherwise we
180-
# would get "warning: undefined variable 'CI'".
181-
ifeq ($(shell printenv CI),)
182-
LN := ln -f -s
183-
else
184-
LN := cp -f -r
185-
endif
170+
# LN is expected to be an atomic action, meaning that two Make processes
171+
# can run the "link $(DOWNLOAD_DIR)/tools/xxx@$(XXX_VERSION)_$(HOST_OS)_$(HOST_ARCH)
172+
# to $(bin_dir)/tools/xxx" operation simulatiously without issues (both
173+
# will perform the action and the second time the link will be overwritten).
174+
LN := ln -fs
186175

187176
UC = $(shell echo '$1' | tr a-z A-Z)
188177
LC = $(shell echo '$1' | tr A-Z a-z)
@@ -204,8 +193,8 @@ TOOL_NAMES :=
204193
# in targets or in scripts, because it is agnostic to the
205194
# working directory
206195
# - an unversioned target $(bin_dir)/tools/xxx is generated that
207-
# creates a copy/ link to the corresponding versioned target:
208-
# $(bin_dir)/tools/xxx@$(XXX_VERSION)_$(HOST_OS)_$(HOST_ARCH)
196+
# creates a link to the corresponding versioned target:
197+
# $(DOWNLOAD_DIR)/tools/xxx@$(XXX_VERSION)_$(HOST_OS)_$(HOST_ARCH)
209198
define tool_defs
210199
TOOL_NAMES += $1
211200

@@ -275,7 +264,6 @@ $(bin_dir)/tools/go: $(bin_dir)/scratch/VENDORED_GO_VERSION | $(bin_dir)/tools/g
275264

276265
# The "_" in "_bin" prevents "go mod tidy" from trying to tidy the vendored goroot.
277266
$(bin_dir)/tools/goroot: $(bin_dir)/scratch/VENDORED_GO_VERSION | $(GOVENDOR_DIR)/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH)/goroot $(bin_dir)/tools
278-
@rm -rf $(bin_dir)/tools/goroot
279267
@cd $(dir $@) && $(LN) $(patsubst $(bin_dir)/%,../%,$(word 1,$|)) $(notdir $@)
280268
@touch $@ # making sure the target of the symlink is newer than *_VERSION
281269

@@ -324,7 +312,6 @@ GO_DEPENDENCIES += golangci-lint=github.com/golangci/golangci-lint/cmd/golangci-
324312
GO_DEPENDENCIES += govulncheck=golang.org/x/vuln/cmd/govulncheck
325313
GO_DEPENDENCIES += operator-sdk=github.com/operator-framework/operator-sdk/cmd/operator-sdk
326314
GO_DEPENDENCIES += gh=github.com/cli/cli/v2/cmd/gh
327-
GO_DEPENDENCIES += preflight=github.com/redhat-openshift-ecosystem/openshift-preflight/cmd/preflight
328315

329316
#################
330317
# go build tags #
@@ -560,6 +547,29 @@ $(DOWNLOAD_DIR)/tools/rclone@$(RCLONE_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWN
560547
chmod +x $(outfile); \
561548
rm -f $(outfile).zip
562549

550+
PREFLIGHT_linux_amd64_SHA256SUM=20f31e4af2004e8e3407844afea4e973975069169d69794e0633f0cb91d45afd
551+
PREFLIGHT_linux_arm64_SHA256SUM=c42cf4132027d937da88da07760e8fd9b1a8836f9c7795a1b60513d99c6939fe
552+
553+
# Currently there are no offical releases for darwin, you cannot submit results
554+
# on non-official binaries, but we can still run tests.
555+
#
556+
# Once https://github.com/redhat-openshift-ecosystem/openshift-preflight/pull/942 is merged
557+
# we can remove this darwin specific hack
558+
.PRECIOUS: $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_darwin_$(HOST_ARCH)
559+
$(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_darwin_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
560+
@source $(lock_script) $@; \
561+
mkdir -p $(outfile).dir; \
562+
GOWORK=off GOBIN=$(outfile).dir $(GO) install github.com/redhat-openshift-ecosystem/openshift-preflight/cmd/preflight@$(PREFLIGHT_VERSION); \
563+
mv $(outfile).dir/preflight $(outfile); \
564+
rm -rf $(outfile).dir
565+
566+
.PRECIOUS: $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH)
567+
$(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
568+
@source $(lock_script) $@; \
569+
$(CURL) https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/$(PREFLIGHT_VERSION)/preflight-linux-$(HOST_ARCH) -o $(outfile); \
570+
$(checkhash_script) $(outfile) $(PREFLIGHT_linux_$(HOST_ARCH)_SHA256SUM); \
571+
chmod +x $(outfile)
572+
563573
#################
564574
# Other Targets #
565575
#################

0 commit comments

Comments
 (0)