-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (64 loc) · 2.14 KB
/
Copy pathMakefile
File metadata and controls
76 lines (64 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
CURPATH=$(PWD)
BIN_PATH=$(CURPATH)/bin
YQ = $(BIN_PATH)/yq
YQ_VERSION = v4.47.1
export PATH := $(BIN_PATH):$(PATH)
all: build
.PHONY: all
# Include the library makefile
include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
golang.mk \
targets/openshift/deps-gomod.mk \
targets/openshift/images.mk \
targets/openshift/yq.mk \
)
# Bump OCP version in CSV and OLM metadata
# Also updates the Makefile and README.md to the new version
#
# Example:
# make metadata VERSION=4.20.0
metadata: ensure-yq
ifdef VERSION
./hack/update-metadata.sh $(VERSION)
else
./hack/update-metadata.sh
endif
.PHONY: metadata
# Check if GOEXPERIMENT=strictfipsruntime is supported
GOEXPERIMENT_SUPPORTED := $(shell GOEXPERIMENT=strictfipsruntime go version >/dev/null 2>&1 && echo "true" || echo "false")
ifeq ($(GOEXPERIMENT_SUPPORTED),true)
$(info strictfipsruntime is supported, building with FIPS compliance)
GO :=CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go
GO_BUILD_FLAGS :=-trimpath -tags strictfipsruntime,openssl
else
$(warning WARN: building without FIPS support, GOEXPERIMENT strictfipsruntime is not available in the go compiler)
$(warning WARN: this build cannot be used in CI or production, due to lack of FIPS!!)
GO :=CGO_ENABLED=1 go
GO_BUILD_FLAGS :=-trimpath
endif
# Run core verification and all self contained tests.
#
# Example:
# make check
check: | verify test-unit
.PHONY: check
IMAGE_REGISTRY?=registry.svc.ci.openshift.org
# This will call a macro called "build-image" which will generate image specific targets based on the parameters:
# $0 - macro name
# $1 - target name
# $2 - image ref
# $3 - Dockerfile path
# $4 - context directory for image build
# It will generate target "image-$(1)" for building the image and binding it as a prerequisite to target "images".
$(call build-image,secrets-store-csi-driver-operator,$(IMAGE_REGISTRY)/ocp/5.0:secrets-store-csi-driver-operator,./Dockerfile.openshift,.)
clean: clean-yq
$(RM) secrets-store-csi-driver-operator
.PHONY: clean
GO_TEST_PACKAGES :=./pkg/... ./cmd/...
# Run e2e tests. Requires openshift-tests in $PATH.
#
# Example:
# make test-e2e
test-e2e:
hack/e2e.sh
.PHONY: test-e2e