The commands can be run concurrently, with the exception of e2e that has to be run after e2e-setup is done. The e2e target does not check whether cert-manager and the addons are installed. The two only scripts that were kept are: - make/e2e.sh (previously called ./devel/run-e2e.sh) - make/cluster.sh (previsouly called ./devel/cluster/create.sh) The reason for the removal of the other scripts is that they didn't have that much logic and could easily ported to Make, improving greatly the execution speed thanks to make's concurrency. make/e2e.sh now behaves "as expected" when using -ginkgo.focus or GINKGO_FOCUS; previously, the logs would not be shown before the end of the test. make/cluster.sh has lost the ability to create an OpenShift 3.11 cluster. for running the end-to-end tests. The two reasons are that OpenShift 4 wasn't supported by the script devel/cluster/create.sh, and OpenShift 3.11 is not supported by cert-manager anymore. The Makefile targets that were used in the Prow jobs (verify, verify_deps, verify_chart, verify_upgrade, and cluster) have been kept around. They now show a warning to encourage people to use the new Make-based targets. When running one of the deprecated targets the Makefile won't check the presence of the system tools such as Go and jq, since Bazel takes care of these dependencies. On version change, downloaded tools and images are re-downloaded. The command 'make clean' now keeps the downloaded images and tools. Note that a lot of attention has been put into having a Make system that works flawlessly both on Linux and on BSDs (such as macOS). You will note that some recursive calls to make are made, and $(MAKE) instead of plain "make" is used in that case. If we didn't use $(MAKE), we would have concurrency issues, and warnings such as: make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. Signed-off-by: Maël Valais <mael@vls.dev>
61 lines
2.0 KiB
Makefile
61 lines
2.0 KiB
Makefile
# Copyright 2020 The cert-manager Authors.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# For details on some of these "prelude" settings, see:
|
|
# https://clarkgrubb.com/makefile-style-guide
|
|
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules
|
|
SHELL := /bin/bash
|
|
.SHELLFLAGS := -uo pipefail -c
|
|
.DEFAULT_GOAL := help
|
|
.DELETE_ON_ERROR:
|
|
.SUFFIXES:
|
|
|
|
SOURCES := $(shell find . -type f -name "*.go")
|
|
|
|
GOFLAGS := -ldflags '-w -s' -trimpath
|
|
|
|
## GOBUILDPROCS is passed to GOMAXPROCS when running go build; if you're running
|
|
## make in parallel using "-jN" then you'll probably want to reduce the value
|
|
## of GOBUILDPROCS or else you could end up running N parallel invocations of
|
|
## go build, each of which will spin up as many threads as are available on your
|
|
## system.
|
|
GOBUILDPROCS ?=
|
|
|
|
include make/git.mk
|
|
include make/tools.mk
|
|
include make/ci.mk
|
|
include make/test.mk
|
|
include make/base_images.mk
|
|
include make/cmctl.mk
|
|
include make/server.mk
|
|
include make/containers.mk
|
|
include make/release.mk
|
|
include make/manifests.mk
|
|
include make/licenses.mk
|
|
include make/e2e-setup.mk
|
|
include make/help.mk
|
|
|
|
.PHONY: clean
|
|
## Remove the kind cluster and everything that was built. The downloaded images
|
|
## and tools are kept intact to avoid re-downloading everything. To really wipe
|
|
## out everything, run the command:
|
|
##
|
|
## rm -rf bin
|
|
##
|
|
## @category Development
|
|
clean:
|
|
@$(eval KIND_CLUSTER_NAME ?= kind)
|
|
bin/tools/kind delete cluster --name=$(shell cat bin/scratch/kind-exists 2>/dev/null || echo $(KIND_CLUSTER_NAME)) -q 2>/dev/null || true
|
|
rm -rf $(filter-out bin/downloaded,$(wildcard bin/*))
|