4aff857d Merge pull request #109 from pohly/alpha-test-defaults 0427289d Merge pull request #110 from pohly/kind-0.9-bazel-build-workaround 9a370ab9 prow.sh: work around "kind build node-image" failure 522361ec prow.sh: only run alpha tests for latest Kubernetes release 22c0395c Merge pull request #108 from bnrjee/master b5b447b5 Add go ldflags using LDFLAGS at the time of compilation 16f4afbd Merge pull request #107 from pohly/kind-update 7bcee13d prow.sh: update to kind 0.9, support Kubernetes 1.19 df518fbd prow.sh: usage of Bazel optional c3afd427 Merge pull request #104 from xing-yang/snapshot dde93b22 Update to snapshot-controller v3.0.0a0f195cc
Merge pull request #106 from msau42/fix-canary7100c120
Only set staging registry when running canary jobb3c65f9c
Merge pull request #99 from msau42/add-release-processe53f3e85
Merge pull request #103 from msau42/fix-canaryd1294628
Document new method for adding CI jobs are new K8s versionse73c2ce5
Use staging registry for canary tests2c098465
Add cleanup instructions to release-notes generation60e1cd3d
Merge pull request #98 from pohly/kubernetes-1-19-fixes0979c091
prow.sh: fix E2E suite for Kubernetes >= 1.183b4a2f1d
prow.sh: fix installing Go for Kubernetes 1.19.01fbb636c
Merge pull request #97 from pohly/go-1.1582d108ac
switch to Go 1.15d8a25300
Merge pull request #95 from msau42/add-release-process843bddca
Add steps on promoting release images0345a835
Merge pull request #94 from linux-on-ibm-z/bump-timeout1fdf2d53
cloud build: bump timeout in Prow job41ec6d15
Merge pull request #93 from animeshk08/patch-15a54e67d
filter-junit: Fix gofmt error0676fcbd
Merge pull request #92 from animeshk08/patch-136ea4ffa
filter-junit: Fix golint errorf5a42037
Merge pull request #91 from cyb70289/arm6443e50d6f
prow.sh: enable building arm64 image0d5bd843
Merge pull request #90 from pohly/k8s-staging-sig-storage3df86b7d
cloud build: k8s-staging-sig-storagec5fd9610
Merge pull request #89 from pohly/cloud-build-binfmtdb0c2a7d
cloud build: initialize support for running commands in Dockerfilebe902f40
Merge pull request #88 from pohly/multiarch-windows-fix340e082f
build.make: optional inclusion of Windows in multiarch images5231f05d
build.make: properly declare push-multiarch4569f27a
build.make: fix push-multiarch ambiguity17dde9ef
Merge pull request #87 from pohly/cloud-buildbd416901
cloud build: initial set of shared files9084fecb
Merge pull request #81 from msau42/add-release-process6f2322e8
Update patch release notes generation command0fcc3b1b
Merge pull request #78 from ggriffiths/fix_csi_snapshotter_rbac_version_setd8c76fee
Support local snapshot RBAC for pull jobsc1bdf5bf
Merge pull request #80 from msau42/add-release-processea1f94aa
update release tools instructions152396e2
Merge pull request #77 from ggriffiths/snapshotter201_update7edc1461
Update snapshotter to version 2.0.14cf843f6
Merge pull request #76 from pohly/build-targets3863a0f6
build for multiple platforms only in CI, add s390x8322a7d0
Merge pull request #72 from pohly/hostpath-update7c5a89c8
prow.sh: use 1.3.0 hostpath driver for testingb8587b2b
Merge pull request #71 from wozniakjan/test-vetfdb32183
Change 'make test-vet' to call 'go vet'd717c8c4
Merge pull request #69 from pohly/test-driver-configa1432bc9
Merge pull request #70 from pohly/kubelet-feature-gates5f74333a
prow.sh: also configure feature gates for kubelet84f78b12
prow.sh: generic driver installation3c34b4f2
Merge pull request #67 from windayski/fix-linkfa90abd0
fix incorrect linkff3cc3f1
Merge pull request #54 from msau42/add-release-processac8a0212
Document the process for releasing a new sidecar23be6525
Merge pull request #65 from msau42/update-hostpath6582f2ff
Update hostpath driver version to get fix for connection-timeout4cc91745
Merge pull request #64 from ggriffiths/snapshotter_2_version_update8191eab6
Update snapshotter to version v2.0.03c463fb1
Merge pull request #61 from msau42/enable-snapshots8b0316c7
Fix overriding of junit results by using unique names for each e2e run5f444b80
Merge pull request #60 from saad-ali/updateHostpathVersionaf9549b5
Update prow hostpath driver version to 1.3.0-rc2f6c74b30
Merge pull request #57 from ggriffiths/version_gt_kubernetes_fixfc809759
Fix version_gt to work with kubernetes prefix9f1f3dd8
Merge pull request #56 from msau42/enable-snapshotsb98b2aed
Enable snapshot tests in 1.17 to be run in non-alpha jobs.9ace0204
Merge pull request #52 from msau42/update-readme540599ba
Merge pull request #53 from msau42/fix-makea4e62996
fix syntax for ppc64le build771ca6f2
Merge pull request #49 from ggriffiths/prowsh_improve_version_gtd7c69d2f
Merge pull request #51 from msau42/enable-multinode4ad69492
Improve snapshot pod running checks and improve version_gt53888ae7
Improve README by adding an explicit Kubernetes dependency section9a7a685e
Create a kind cluster with two worker nodes so that the topology feature can be tested. Test cases that test accessing volumes from multiple nodes need to be skipped4ff2f5f0
Merge pull request #50 from darkowlzz/kind-0.6.080bba1fe
Use kind v0.6.06d674a7f
Merge pull request #47 from Pensu/multi-arch8adde494
Merge pull request #45 from ggriffiths/snapshot_beta_crds003c14b2
Add snapshotter CRDs after cluster setupa41f3860
Merge pull request #46 from mucahitkurt/kind-cluster-cleanup1eaaaa1c
Delete kind cluster after tests run.83a4ef15
Adding build for ppc64le4fcafece
Merge pull request #43 from pohly/system-pod-loggingf41c1351
prow.sh: also log output of system containersee22a9ca
Merge pull request #42 from pohly/use-vendor-dir80678456
travis.yml: also use vendor directory23df4aef
prow.sh: use vendor directory if availablea53bd4c4
Merge pull request #41 from pohly/go-versionc8a1c4af
better handling of Go version5e773d2d
update CI to use Go 1.13.3f419d745
Merge pull request #40 from msau42/add-1.16e0fde8c4
Add new variables for 1.16 and remove 1.13adf00fea
Merge pull request #36 from msau42/full-clonef1697d2c
Do full git clones in travis. Shallow clones are causing test-subtree errors when the depth is exactly 50.2c819198
Merge pull request #34 from pohly/go-mod-tidy518d6af6
Merge pull request #35 from ddebroy/winbld22d6b3ce8
Build Windows only for amd64c1078a65
go-get-kubernetes.sh: automate Kubernetes dependency handling194289aa
update Go mod support0affdf95
Merge pull request #33 from gnufied/enable-hostpath-expansion6208f6ab
Enable hostpath expansion6ecaa76e
Merge pull request #30 from msau42/fix-windowsea2f1b52
build windows binaries with .exe suffix2d335506
Merge pull request #29 from mucahitkurt/create-2-node-kind-clustera8ea8bcc
create 2-node kind cluster since topology support is added to hostpath driverdf8530d9
Merge pull request #27 from pohly/dep-vendor-check35ceaedc
prow.sh: install dep if neededf85ab5af
Merge pull request #26 from ddebroy/windows19fba09b4
Add rule for building Windows binaries04008676
Merge pull request #25 from msau42/fix-master-jobsdc0a5d83
Update kind to v0.5.0aa85b82c
Merge pull request #23 from msau42/fix-master-jobsf46191d9
Kubernetes master changed the way that releases are tagged, which needed changes to kind. There are 3 changes made to prow.sh:1cac3af3
Merge pull request #22 from msau42/add-1.15-jobs0c0dc300
prow.sh: tag master images with a large version numberf4f73cef
Merge pull request #21 from msau42/add-1.15-jobs4e31f078
Change default hostpath driver name to hostpath.csi.k8s.io4b6fa4a0
Update hostpath version for sidecar testing to v1.2.0-rc2ecc79187
Update kind to v0.4.0. This requires overriding Kubernetes versions with specific patch versions that kind 0.4.0 supports. Also, feature gate setting is only supported on 1.15+ due to kind.sigs.k8s.io/v1alpha3 and kubeadm.k8s.io/v1beta2 dependencies.a6f21d40
Add variables for 1.15db8abb6e
Merge pull request #20 from pohly/test-driver-configb2f4e051
prow.sh: flexible test driver config03999882
Merge pull request #19 from pohly/go-mod-vendor066143d1
build.make: allow repos to use 'go mod' for vendoring0bee7493
Merge pull request #18 from pohly/go-versione157b6b5
update to Go 1.12.488dc9a47
Merge pull request #17 from pohly/prow0fafc663
prow.sh: skip sanity testing if component doesn't support itbcac1c1f
Merge pull request #16 from pohly/prow0b10f6a4
prow.sh: update csi-driver-host-path0c2677e8
Merge pull request #15 from pengzhisun/masterff9bce4a
Replace 'return' to 'exit' to fix shellcheck errorc60f3823
Merge pull request #14 from pohly/prow7aaac225
prow.sh: remove AllAlpha=all, part II66177736
Merge pull request #13 from pohly/prowcda2fc58
prow.sh: avoid AllAlpha=true546d5504
prow.sh: debug failing KinD cluster creation9b0d9cd7
build.make: skip shellcheck if Docker is not availableaa45a1cd
prow.sh: more efficient execution of individual testsf3d1d2df
prow.sh: fix hostpath driver version check31dfaf31
prow.sh: fix running of just "alpha" testsf5014439
prow.sh: AllAlpha=true for unknown Kubernetes versions95ae9de9
Merge pull request #9 from pohly/prowd87eccb4
prow.sh: switch back to upstream csi-driver-host-path6602d38b
prow.sh: different E2E suite depending on Kubernetes version741319bd
prow.sh: improve building Kubernetes from source29545bb0
prow.sh: take Go version from Kubernetes source429581c5
prow.sh: pull Go version from travis.yml0a0fd49b
prow.sh: comment clarification2069a0af
Merge pull request #11 from pohly/verify-shellcheck55212ff2
initial Prow test job6c7ba1be
build.make: integrate shellcheck into "make test"b2d25d4f
verify-shellcheck.sh: make it usable in csi-release-tools3b6af7b1
Merge pull request #12 from pohly/local-e2e-suite104a1ac9
build.make: avoid unit-testing E2E test suite34010e75
Merge pull request #10 from pohly/vendor-checke6db50df
check vendor directoryfb13c519
verify-shellcheck.sh: import from Kubernetes94fc1e31
build.make: avoid unit-testing E2E test suite849db0ad
Merge pull request #8 from pohly/subtree-check-relaxcc564f92
verify-subtree.sh: relax check and ignore old content33d58fdc
Merge pull request #5 from pohly/test-enhancementsbe8a4400
Merge pull request #4 from pohly/canary-fixb0336b55
build.make: more readable "make test" output09436b9f
build.make: fix pushing of "canary" image from master branch147892c9
build.make: support suppressing checks154e33d4
build.make: clarify usage of "make V=1" git-subtree-dir: release-tools git-subtree-split: 4aff857d88149e07951fcd1322f462f765401a86
278 lines
11 KiB
Makefile
278 lines
11 KiB
Makefile
# Copyright 2019 The Kubernetes 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.
|
|
|
|
.PHONY: build-% build container-% container push-% push clean test
|
|
|
|
# A space-separated list of all commands in the repository, must be
|
|
# set in main Makefile of a repository.
|
|
# CMDS=
|
|
|
|
# This is the default. It can be overridden in the main Makefile after
|
|
# including build.make.
|
|
REGISTRY_NAME=quay.io/k8scsi
|
|
|
|
# Can be set to -mod=vendor to ensure that the "vendor" directory is used.
|
|
GOFLAGS_VENDOR=
|
|
|
|
# Revision that gets built into each binary via the main.version
|
|
# string. Uses the `git describe` output based on the most recent
|
|
# version tag with a short revision suffix or, if nothing has been
|
|
# tagged yet, just the revision.
|
|
#
|
|
# Beware that tags may also be missing in shallow clones as done by
|
|
# some CI systems (like TravisCI, which pulls only 50 commits).
|
|
REV=$(shell git describe --long --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD)
|
|
|
|
# A space-separated list of image tags under which the current build is to be pushed.
|
|
# Determined dynamically.
|
|
IMAGE_TAGS=
|
|
|
|
# A "canary" image gets built if the current commit is the head of the remote "master" branch.
|
|
# That branch does not exist when building some other branch in TravisCI.
|
|
IMAGE_TAGS+=$(shell if [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 origin/master 2>/dev/null)" ]; then echo "canary"; fi)
|
|
|
|
# A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch.
|
|
# The actual suffix does not matter, only the "release-" prefix is checked.
|
|
IMAGE_TAGS+=$(shell git branch -r --points-at=HEAD | grep 'origin/release-' | grep -v -e ' -> ' | sed -e 's;.*/release-\(.*\);\1-canary;')
|
|
|
|
# A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit.
|
|
# --abbrev=0 suppresses long format, only showing the closest tag.
|
|
IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if [ "$$tagged" ] && [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 $$tagged)" ]; then echo $$tagged; fi)
|
|
|
|
# Images are named after the command contained in them.
|
|
IMAGE_NAME=$(REGISTRY_NAME)/$*
|
|
|
|
ifdef V
|
|
# Adding "-alsologtostderr" assumes that all test binaries contain glog. This is not guaranteed.
|
|
TESTARGS = -v -args -alsologtostderr -v 5
|
|
else
|
|
TESTARGS =
|
|
endif
|
|
|
|
# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables
|
|
# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below.
|
|
|
|
# BUILD_PLATFORMS contains a set of <os> <arch> <suffix> triplets,
|
|
# separated by semicolon. An empty variable or empty entry (= just a
|
|
# semicolon) builds for the default platform of the current Go
|
|
# toolchain.
|
|
BUILD_PLATFORMS =
|
|
|
|
# Add go ldflags using LDFLAGS at the time of compilation.
|
|
IMPORTPATH_LDFLAGS = -X main.version=$(REV)
|
|
EXT_LDFLAGS = -extldflags "-static"
|
|
LDFLAGS =
|
|
FULL_LDFLAGS = $(LDFLAGS) $(IMPORTPATH_LDFLAGS) $(EXT_LDFLAGS)
|
|
# This builds each command (= the sub-directories of ./cmd) for the target platform(s)
|
|
# defined by BUILD_PLATFORMS.
|
|
$(CMDS:%=build-%): build-%: check-go-version-go
|
|
mkdir -p bin
|
|
echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \
|
|
if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '$(FULL_LDFLAGS)' -o "./bin/$*$$suffix" ./cmd/$*); then \
|
|
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
|
|
exit 1; \
|
|
fi; \
|
|
done
|
|
|
|
$(CMDS:%=container-%): container-%: build-%
|
|
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
|
|
|
|
$(CMDS:%=push-%): push-%: container-%
|
|
set -ex; \
|
|
push_image () { \
|
|
docker tag $*:latest $(IMAGE_NAME):$$tag; \
|
|
docker push $(IMAGE_NAME):$$tag; \
|
|
}; \
|
|
for tag in $(IMAGE_TAGS); do \
|
|
if [ "$$tag" = "canary" ] || echo "$$tag" | grep -q -e '-canary$$'; then \
|
|
: "creating or overwriting canary image"; \
|
|
push_image; \
|
|
elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \
|
|
: "creating release image"; \
|
|
push_image; \
|
|
else \
|
|
: "release image $(IMAGE_NAME):$$tag already exists, skipping push"; \
|
|
fi; \
|
|
done
|
|
|
|
build: $(CMDS:%=build-%)
|
|
container: $(CMDS:%=container-%)
|
|
push: $(CMDS:%=push-%)
|
|
|
|
# Additional parameters are needed when pushing to a local registry,
|
|
# see https://github.com/docker/buildx/issues/94.
|
|
# However, that then runs into https://github.com/docker/cli/issues/2396.
|
|
#
|
|
# What works for local testing is:
|
|
# make push-multiarch PULL_BASE_REF=master REGISTRY_NAME=<your account on dockerhub.io> BUILD_PLATFORMS="linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x"
|
|
DOCKER_BUILDX_CREATE_ARGS ?=
|
|
|
|
# This target builds a multiarch image for one command using Moby BuildKit builder toolkit.
|
|
# Docker Buildx is included in Docker 19.03.
|
|
#
|
|
# ./cmd/<command>/Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows].
|
|
# It is currently optional: if no such file exists, Windows images are not included,
|
|
# even when Windows is listed in BUILD_PLATFORMS. That way, projects can test that
|
|
# Windows binaries can be built before adding a Dockerfile for it.
|
|
#
|
|
# BUILD_PLATFORMS determines which individual images are included in the multiarch image.
|
|
# PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name, and determines
|
|
# the tag for the resulting multiarch image.
|
|
$(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-%
|
|
set -ex; \
|
|
DOCKER_CLI_EXPERIMENTAL=enabled; \
|
|
export DOCKER_CLI_EXPERIMENTAL; \
|
|
docker buildx create $(DOCKER_BUILDX_CREATE_ARGS) --use --name multiarchimage-buildertest; \
|
|
trap "docker buildx rm multiarchimage-buildertest" EXIT; \
|
|
dockerfile_linux=$$(if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi); \
|
|
dockerfile_windows=$$(if [ -e ./cmd/$*/Dockerfile.Windows ]; then echo ./cmd/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \
|
|
if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \
|
|
if ! [ -f "$$dockerfile_windows" ]; then \
|
|
build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe//g' -e 's/; *;/;/g')"; \
|
|
fi; \
|
|
pushMultiArch () { \
|
|
tag=$$1; \
|
|
echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do \
|
|
docker buildx build --push \
|
|
--tag $(IMAGE_NAME):$$arch-$$os-$$tag \
|
|
--platform=$$os/$$arch \
|
|
--file $$(eval echo \$${dockerfile_$$os}) \
|
|
--build-arg binary=./bin/$*$$suffix \
|
|
--label revision=$(REV) \
|
|
.; \
|
|
done; \
|
|
images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do echo $(IMAGE_NAME):$$arch-$$os-$$tag; done); \
|
|
docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \
|
|
docker manifest push -p $(IMAGE_NAME):$$tag; \
|
|
}; \
|
|
if [ $(PULL_BASE_REF) = "master" ]; then \
|
|
: "creating or overwriting canary image"; \
|
|
pushMultiArch canary; \
|
|
elif echo $(PULL_BASE_REF) | grep -q -e 'release-*' ; then \
|
|
: "creating or overwriting canary image for release branch"; \
|
|
release_canary_tag=$$(echo $(PULL_BASE_REF) | cut -f2 -d '-')-canary; \
|
|
pushMultiArch $$release_canary_tag; \
|
|
elif docker pull $(IMAGE_NAME):$(PULL_BASE_REF) 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$(PULL_BASE_REF) not found"; then \
|
|
: "creating release image"; \
|
|
pushMultiArch $(PULL_BASE_REF); \
|
|
else \
|
|
: "ERROR: release image $(IMAGE_NAME):$(PULL_BASE_REF) already exists: a new tag is required!"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: check-pull-base-ref
|
|
check-pull-base-ref:
|
|
if ! [ "$(PULL_BASE_REF)" ]; then \
|
|
echo >&2 "ERROR: PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name."; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: push-multiarch
|
|
push-multiarch: $(CMDS:%=push-multiarch-%)
|
|
|
|
clean:
|
|
-rm -rf bin
|
|
|
|
test: check-go-version-go
|
|
|
|
.PHONY: test-go
|
|
test: test-go
|
|
test-go:
|
|
@ echo; echo "### $@:"
|
|
go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS)
|
|
|
|
.PHONY: test-vet
|
|
test: test-vet
|
|
test-vet:
|
|
@ echo; echo "### $@:"
|
|
go vet $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)`
|
|
|
|
.PHONY: test-fmt
|
|
test: test-fmt
|
|
test-fmt:
|
|
@ echo; echo "### $@:"
|
|
files=$$(find . -name '*.go' | grep -v './vendor' $(TEST_FMT_FILTER_CMD)); \
|
|
if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \
|
|
echo "formatting errors:"; \
|
|
gofmt -d $$files; \
|
|
false; \
|
|
fi
|
|
|
|
# This test only runs when dep >= 0.5 is installed, which is the case for the CI setup.
|
|
# When using 'go mod', we allow the test to be skipped in the Prow CI under some special
|
|
# circumstances, because it depends on accessing all remote repos and thus
|
|
# running it all the time would defeat the purpose of vendoring:
|
|
# - not handling a PR or
|
|
# - the fabricated merge commit leaves go.mod, go.sum and vendor dir unchanged
|
|
# - release-tools also didn't change (changing rules or Go version might lead to
|
|
# a different result and thus must be tested)
|
|
# - import statements not changed (because if they change, go.mod might have to be updated)
|
|
#
|
|
# "git diff" is intelligent enough to annotate changes inside the "import" block in
|
|
# the start of the diff hunk:
|
|
#
|
|
# diff --git a/rpc/common.go b/rpc/common.go
|
|
# index bb4a5c4..5fa4271 100644
|
|
# --- a/rpc/common.go
|
|
# +++ b/rpc/common.go
|
|
# @@ -21,7 +21,6 @@ import (
|
|
# "fmt"
|
|
# "time"
|
|
#
|
|
# - "google.golang.org/grpc"
|
|
# "google.golang.org/grpc/codes"
|
|
# "google.golang.org/grpc/status"
|
|
#
|
|
# We rely on that to find such changes.
|
|
#
|
|
# Vendoring is optional when using go.mod.
|
|
.PHONY: test-vendor
|
|
test: test-vendor
|
|
test-vendor:
|
|
@ echo; echo "### $@:"
|
|
@ ./release-tools/verify-vendor.sh
|
|
|
|
.PHONY: test-subtree
|
|
test: test-subtree
|
|
test-subtree:
|
|
@ echo; echo "### $@:"
|
|
./release-tools/verify-subtree.sh release-tools
|
|
|
|
# Components can extend the set of directories which must pass shellcheck.
|
|
# The default is to check only the release-tools directory itself.
|
|
TEST_SHELLCHECK_DIRS=release-tools
|
|
.PHONY: test-shellcheck
|
|
test: test-shellcheck
|
|
test-shellcheck:
|
|
@ echo; echo "### $@:"
|
|
@ ret=0; \
|
|
if ! command -v docker; then \
|
|
echo "skipped, no Docker"; \
|
|
exit 0; \
|
|
fi; \
|
|
for dir in $(abspath $(TEST_SHELLCHECK_DIRS)); do \
|
|
echo; \
|
|
echo "$$dir:"; \
|
|
./release-tools/verify-shellcheck.sh "$$dir" || ret=1; \
|
|
done; \
|
|
exit $$ret
|
|
|
|
# Targets in the makefile can depend on check-go-version-<path to go binary>
|
|
# to trigger a warning if the x.y version of that binary does not match
|
|
# what the project uses. Make ensures that this is only checked once per
|
|
# invocation.
|
|
.PHONY: check-go-version-%
|
|
check-go-version-%:
|
|
./release-tools/verify-go-version.sh "$*"
|