-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from zeeke/sync-20240201
OCPBUGS-28248: Downstream Sync 2024-02-01
- Loading branch information
Showing
501 changed files
with
13,937 additions
and
6,092 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ export WATCH_NAMESPACE?=openshift-sriov-network-operator | |
export GOFLAGS+=-mod=vendor | ||
export GO111MODULE=on | ||
PKGS=$(shell go list ./... | grep -v -E '/vendor/|/test|/examples') | ||
TESTPKGS?=./... | ||
|
||
# go source files, ignore vendor directory | ||
SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*") | ||
|
@@ -51,7 +52,7 @@ GOLANGCI_LINT = $(BIN_DIR)/golangci-lint | |
# golangci-lint version should be updated periodically | ||
# we keep it fixed to avoid it from unexpectedly failing on the project | ||
# in case of a version bump | ||
GOLANGCI_LINT_VER = v1.51.0 | ||
GOLANGCI_LINT_VER = v1.55.2 | ||
|
||
GOLANGCI_LINT = $(BIN_DIR)/golangci-lint | ||
# golangci-lint version should be updated periodically | ||
|
@@ -62,7 +63,7 @@ GOLANGCI_LINT_VER = v1.46.1 | |
|
||
.PHONY: all build clean gendeepcopy test test-e2e test-e2e-k8s run image fmt sync-manifests test-e2e-conformance manifests update-codegen | ||
|
||
all: generate vet build | ||
all: generate lint build | ||
|
||
build: manager _build-sriov-network-config-daemon _build-webhook | ||
|
||
|
@@ -82,14 +83,14 @@ image: ; $(info Building images...) | |
$(IMAGE_BUILDER) build -f $(DOCKERFILE_WEBHOOK) -t $(WEBHOOK_IMAGE_TAG) $(CURPATH) $(IMAGE_BUILD_OPTS) | ||
|
||
# Run tests | ||
test: generate vet manifests envtest | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir=/tmp -p path)" HOME="$(shell pwd)" go test ./... -coverprofile cover.out -v | ||
test: generate lint manifests envtest | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir=/tmp -p path)" HOME="$(shell pwd)" go test -coverprofile cover.out -v ${TESTPKGS} | ||
|
||
# Build manager binary | ||
manager: generate vet _build-manager | ||
manager: generate _build-manager | ||
|
||
# Run against the configured Kubernetes cluster in ~/.kube/config | ||
run: vet skopeo install | ||
run: skopeo install | ||
hack/run-locally.sh | ||
|
||
# Install CRDs into a cluster | ||
|
@@ -137,10 +138,6 @@ fmt: ## Go fmt your code | |
fmt-code: | ||
go fmt ./... | ||
|
||
# Run go vet against code | ||
vet: | ||
go vet ./... | ||
|
||
# Generate code | ||
generate: controller-gen | ||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | ||
|
@@ -162,7 +159,7 @@ envtest: ## Download envtest-setup locally if necessary. | |
|
||
GOMOCK = $(shell pwd)/bin/mockgen | ||
gomock: | ||
$(call go-get-tool,$(GOMOCK),github.com/golang/mock/[email protected]) | ||
$(call go-install-tool,$(GOMOCK),github.com/golang/mock/[email protected]) | ||
|
||
# go-install-tool will 'go install' any package $2 and install it to $1. | ||
define go-install-tool | ||
|
@@ -210,7 +207,7 @@ redeploy-operator-virtual-cluster: | |
test-e2e-validation-only: | ||
SUITE=./test/validation ./hack/run-e2e-conformance.sh | ||
|
||
test-e2e: generate vet manifests skopeo envtest | ||
test-e2e: generate manifests skopeo envtest | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir=/tmp -p path)"; source hack/env.sh; HOME="$(shell pwd)" go test ./test/e2e/... -timeout 60m -coverprofile cover.out -v | ||
|
||
test-e2e-k8s: export NAMESPACE=sriov-network-operator | ||
|
@@ -219,14 +216,9 @@ test-e2e-k8s: test-e2e | |
test-bindata-scripts: fakechroot | ||
fakechroot ./test/scripts/enable-kargs_test.sh | ||
|
||
test-%: generate vet manifests envtest | ||
test-%: generate manifests envtest | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir=/tmp -p path)" HOME="$(shell pwd)" go test ./$*/... -coverprofile cover-$*.out -coverpkg ./... -v | ||
|
||
# deploy-setup-k8s: export NAMESPACE=sriov-network-operator | ||
# deploy-setup-k8s: export ADMISSION_CONTROLLERS_ENABLED=false | ||
# deploy-setup-k8s: export CNI_BIN_PATH=/opt/cni/bin | ||
# test-e2e-k8s: test-e2e | ||
|
||
GOCOVMERGE = $(BIN_DIR)/gocovmerge | ||
gocovmerge: ## Download gocovmerge locally if necessary. | ||
$(call go-install-tool,$(GOCOVMERGE),github.com/shabbyrobe/gocovmerge/cmd/gocovmerge@latest) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.