Skip to content

Commit 03c7b1c

Browse files
authored
Merge pull request #1857 from ncdc/capd-ci
🏃 Reenable building and testing CAPD
2 parents ccb2174 + cf6cdea commit 03c7b1c

18 files changed

+62
-85
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ modules: ## Runs go mod to ensure modules are up to date.
202202
go mod tidy
203203
cd $(TOOLS_DIR); go mod tidy
204204
cd $(E2E_FRAMEWORK_DIR); go mod tidy
205-
cd test/infrastructure/docker; go mod tidy
206205

207206
## --------------------------------------
208207
## Docker
@@ -357,11 +356,10 @@ verify:
357356
./hack/verify-shellcheck.sh
358357
$(MAKE) verify-modules
359358
$(MAKE) verify-gen
360-
$(MAKE) verify-modules
361359

362360
.PHONY: verify-modules
363361
verify-modules: modules
364-
@if !(git diff --quiet HEAD -- go.sum go.mod hack/tools/go.mod hack/tools/go.sum test/infrastructure/docker/go.sum); then \
362+
@if !(git diff --quiet HEAD -- go.sum go.mod hack/tools/go.mod hack/tools/go.sum); then \
365363
echo "go module files are out of date"; exit 1; \
366364
fi
367365

scripts/ci-build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ set -o pipefail
2020

2121
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222

23+
# Core Cluster API
2324
cd "${REPO_ROOT}" && make manager clusterctl e2e-framework
25+
26+
echo "*** Building Cluster API Provider Docker ***"
27+
# Docker provider
28+
cd "${REPO_ROOT}/test/infrastructure/docker" && make manager

scripts/ci-test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ source ./scripts/fetch_ext_bins.sh
2929
fetch_tools
3030
setup_envs
3131
make generate test
32+
33+
echo "*** Testing Cluster API Provider Docker ***"
34+
# Docker provider
35+
cd test/infrastructure/docker
36+
make generate test

test/infrastructure/docker/Makefile

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ BIN_DIR := bin
4040
# Binaries.
4141
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
4242
CONVERSION_GEN := $(TOOLS_BIN_DIR)/conversion-gen
43+
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
4344

4445
# Define Docker related variables. Releases should modify and double check these vars.
4546
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
@@ -64,7 +65,7 @@ help: ## Display this help
6465
## --------------------------------------
6566

6667
.PHONY: test
67-
test: generate lint ## Run tests
68+
test: ## Run tests
6869
go test -v ./...
6970

7071
test-e2e: ## Run the end-to-end tests
@@ -77,7 +78,7 @@ test-e2e: ## Run the end-to-end tests
7778
## --------------------------------------
7879

7980
.PHONY: manager
80-
manager: lint-full ## Build manager binary
81+
manager: ## Build manager binary
8182
go build -o $(BIN_DIR)/manager sigs.k8s.io/cluster-api/test/infrastructure/docker
8283

8384
$(CONTROLLER_GEN): $(TOOLS_DIR)/go.mod # Build controller-gen from tools folder.
@@ -86,6 +87,20 @@ $(CONTROLLER_GEN): $(TOOLS_DIR)/go.mod # Build controller-gen from tools folder.
8687
$(CONVERSION_GEN): $(TOOLS_DIR)/go.mod
8788
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/conversion-gen k8s.io/code-generator/cmd/conversion-gen
8889

90+
$(GOLANGCI_LINT): $(TOOLS_DIR)/go.mod # Build golangci-lint from tools folder.
91+
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
92+
93+
## --------------------------------------
94+
## Linting
95+
## --------------------------------------
96+
97+
.PHONY: lint lint-full
98+
lint: $(GOLANGCI_LINT) ## Lint codebase
99+
$(GOLANGCI_LINT) run -v
100+
101+
lint-full: $(GOLANGCI_LINT) ## Run slower linters to detect possible issues
102+
$(GOLANGCI_LINT) run -v --fast=false
103+
89104
## --------------------------------------
90105
## Generate / Manifests
91106
## --------------------------------------
@@ -110,7 +125,7 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
110125
$(CONTROLLER_GEN) \
111126
paths=./api/... \
112127
paths=./controllers/... \
113-
crd:trivialVersions=true \
128+
crd:trivialVersions=true,preserveUnknownFields=false \
114129
rbac:roleName=manager-role \
115130
output:crd:dir=./config/crd/bases
116131

@@ -229,11 +244,8 @@ clean-release: ## Remove the release folder
229244
.PHONY: verify
230245
verify:
231246
./hack/verify-boilerplate.sh
232-
./hack/verify-doctoc.sh
233-
./hack/verify-shellcheck.sh
234247
$(MAKE) verify-modules
235248
$(MAKE) verify-gen
236-
$(MAKE) verify-modules
237249

238250
.PHONY: verify-modules
239251
verify-modules: modules

test/infrastructure/docker/cloudinit/kindadapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func Run(cloudConfig []byte, cmder exec.Cmder) ([]string, error) {
6666
}
6767

6868
// executes all the actions in order
69-
var lines []string
69+
var lines []string //nolint:prealloc
7070
for _, a := range actions {
7171
actionLines, err := a.Run(cmder)
7272
if err != nil {

test/infrastructure/docker/cloudinit/runcmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (a *runCmd) Unmarshal(userData []byte) error {
8686

8787
// Run the runCmd
8888
func (a *runCmd) Run(cmder exec.Cmder) ([]string, error) {
89-
var lines []string
89+
var lines []string //nolint:prealloc
9090
for _, c := range a.Cmds {
9191
// kubeadm in docker requires to ignore some errors, and this requires to modify the cmd generate by CABPK by default...
9292
c = hackKubeadmIgnoreErrors(c)

test/infrastructure/docker/cloudinit/runcmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (cmd *fakeCmd) Write(s string) {
190190
if cmd.w != nil {
191191
_, err := cmd.w.Write([]byte(s))
192192
if err != nil {
193-
193+
panic(err)
194194
}
195195
}
196196
}

test/infrastructure/docker/cloudinit/writefiles.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (a *writeFilesAction) Unmarshal(userData []byte) error {
5656
}
5757

5858
func (a *writeFilesAction) Run(cmder exec.Cmder) ([]string, error) {
59-
var lines []string
59+
var lines []string //nolint:prealloc
6060
for _, f := range a.Files {
6161
// Fix attributes and apply defaults
6262
path := fixPath(f.Path) //NB. the real cloud init module for writes files converts path into absolute paths; this is not possible here...
@@ -140,11 +140,12 @@ func fixEncoding(e string) []string {
140140
e = strings.ToLower(e)
141141
e = strings.TrimSpace(e)
142142

143-
if e == "gz" || e == "gzip" {
143+
switch e {
144+
case "gz", "gzip":
144145
return []string{"application/x-gzip"}
145-
} else if e == "gz+base64" || e == "gzip+base64" || e == "gz+b64" || e == "gzip+b64" {
146+
case "gz+base64", "gzip+base64", "gz+b64", "gzip+b64":
146147
return []string{"application/base64", "application/x-gzip"}
147-
} else if e == "base64" || e == "b64" {
148+
case "base64", "b64":
148149
return []string{"application/base64"}
149150
}
150151

test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.2.3
7+
controller-gen.kubebuilder.io/version: v0.2.4
88
creationTimestamp: null
99
name: dockerclusters.infrastructure.cluster.x-k8s.io
1010
spec:
@@ -27,12 +27,12 @@ spec:
2727
apiVersion:
2828
description: 'APIVersion defines the versioned schema of this representation
2929
of an object. Servers should convert recognized schemas to the latest
30-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
3131
type: string
3232
kind:
3333
description: 'Kind is a string value representing the REST resource this
3434
object represents. Servers may infer this from the endpoint the client
35-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3636
type: string
3737
metadata:
3838
type: object

test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.2.3
7+
controller-gen.kubebuilder.io/version: v0.2.4
88
creationTimestamp: null
99
name: dockermachines.infrastructure.cluster.x-k8s.io
1010
spec:
@@ -27,12 +27,12 @@ spec:
2727
apiVersion:
2828
description: 'APIVersion defines the versioned schema of this representation
2929
of an object. Servers should convert recognized schemas to the latest
30-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
3131
type: string
3232
kind:
3333
description: 'Kind is a string value representing the REST resource this
3434
object represents. Servers may infer this from the endpoint the client
35-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3636
type: string
3737
metadata:
3838
type: object

test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
7-
controller-gen.kubebuilder.io/version: v0.2.3
7+
controller-gen.kubebuilder.io/version: v0.2.4
88
creationTimestamp: null
99
name: dockermachinetemplates.infrastructure.cluster.x-k8s.io
1010
spec:
@@ -26,12 +26,12 @@ spec:
2626
apiVersion:
2727
description: 'APIVersion defines the versioned schema of this representation
2828
of an object. Servers should convert recognized schemas to the latest
29-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
29+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
3030
type: string
3131
kind:
3232
description: 'Kind is a string value representing the REST resource this
3333
object represents. Servers may infer this from the endpoint the client
34-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
34+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3535
type: string
3636
metadata:
3737
type: object

test/infrastructure/docker/e2e/docker_suite_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build e2e
2+
13
/*
24
Copyright 2019 The Kubernetes Authors.
35

test/infrastructure/docker/e2e/docker_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build e2e
2+
13
/*
24
Copyright 2019 The Kubernetes Authors.
35
@@ -97,7 +99,7 @@ type ClusterGenerator struct {
9799

98100
func (c *ClusterGenerator) GenerateCluster(namespace string) (*capiv1.Cluster, *infrav1.DockerCluster) {
99101
generatedName := fmt.Sprintf("test-%d", c.counter)
100-
c.counter += 1
102+
c.counter++
101103

102104
infraCluster := &infrav1.DockerCluster{
103105
ObjectMeta: metav1.ObjectMeta{
@@ -135,7 +137,7 @@ func (n *NodeGenerator) GenerateNode(clusterName string) framework.Node {
135137
namespace := "default"
136138
version := "v1.15.3"
137139
generatedName := fmt.Sprintf("controlplane-%d", n.counter)
138-
n.counter += 1
140+
n.counter++
139141
infraMachine := &infrav1.DockerMachine{
140142
ObjectMeta: metav1.ObjectMeta{
141143
Namespace: namespace,

test/infrastructure/docker/hack/tools/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module sigs.k8s.io/cluster-api/test/infrastructure/docker/hack/tools
33
go 1.12
44

55
require (
6+
github.com/golangci/golangci-lint v1.21.0
67
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20190830181856-67d897059593
78
sigs.k8s.io/controller-tools v0.2.4
89
)

test/infrastructure/docker/hack/tools/go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB
1313
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
1414
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
1515
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
16+
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
1617
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1718
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
1819
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
@@ -128,6 +129,7 @@ github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDS
128129
github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk=
129130
github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI=
130131
github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks=
132+
github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg=
131133
github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc=
132134
github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8=
133135
github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU=
@@ -219,6 +221,7 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0
219221
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
220222
github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
221223
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
224+
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
222225
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
223226
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
224227
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -267,6 +270,7 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
267270
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
268271
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
269272
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
273+
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
270274
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
271275
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
272276
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -294,7 +298,9 @@ github.com/securego/gosec v0.0.0-20190912120752-140048b2a218/go.mod h1:q6oYAujd2
294298
github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do=
295299
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
296300
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
301+
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=
297302
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
303+
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=
298304
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
299305
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
300306
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=

test/infrastructure/docker/hack/tools/tools.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ limitations under the License.
2020
package tools
2121

2222
import (
23+
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
2324
_ "sigs.k8s.io/cluster-api/hack/tools/release"
2425
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
2526
)

test/infrastructure/docker/hack/verify-boilerplate.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ set -o errexit
1717
set -o nounset
1818
set -o pipefail
1919

20-
# shellcheck source=./test/infrastructure/docker/hack/utils.sh
21-
source "$(dirname "$0")/utils.sh"
22-
# cd to the root path
23-
cd_root_path
20+
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
21+
cd "${REPO_ROOT}" || exit 1
2422

2523
git ls-files | grep --invert-match "\.deepcopy\.go" | grep --invert-match "^third_party" | xargs go run ./hack/verify-boilerplate.go

test/infrastructure/docker/hack/verify-shellcheck.sh

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

0 commit comments

Comments
 (0)