Skip to content

Commit

Permalink
auto-sync repository files - fix: Adding build vars, Core added conta…
Browse files Browse the repository at this point in the history
…iners_image_openpgp build tag (knative#35)
  • Loading branch information
katanomibot committed May 12, 2023
1 parent fea1dff commit 4d76ff8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ spec:
ls -la $TOOLBIN
fi
go mod download
make test
- name: test-report-path
value: ./test.json
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run:
timeout: 10m

build-tags: []
build-tags: [containers_image_openpgp]

skip-dirs:
- config
Expand Down
5 changes: 3 additions & 2 deletions .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Use :nonroot base image for all containers
defaultBaseImage: katanomi/distroless-static:nonroot
# file synced using katanomi/hack
# DO NOT CHANGE THIS FILE DIRECTLY
defaultBaseImage: cgr.dev/chainguard/static
9 changes: 5 additions & 4 deletions base.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ check: fmt vet lint test ##@Development Run check against code
fmt: ##@Development Run go fmt against code.
go fmt ./...

GO_VET_TAGS ?= e2e,containers_image_openpgp
vet: ##@Development Run go vet against code.
go vet ./...
go vet -tags e2e ./...
go vet -tags $(GO_VET_TAGS) ./...

lint: golangcilint ##@Development Run golangci-lint against code.
$(GOLANGCILINT) run
Expand All @@ -49,10 +49,11 @@ ENVTEST_ASSETS_DIR=$(TOOLBIN)/testbin
COVER_PROFILE ?= cover.out
TEST_FILE ?= test.json
GO_TEST_FLAGS ?= -v -json
GO_TEST_TAGS ?= containers_image_openpgp
test: manifests generate fmt vet goimports ##@Development Run tests.
mkdir -p ${ENVTEST_ASSETS_DIR}
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test $(GO_TEST_FLAGS) -coverpkg=./... -coverprofile $(COVER_PROFILE) ./... | tee ${TEST_FILE}
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test $(GO_TEST_FLAGS) -tags=$(GO_TEST_TAGS) -coverpkg=./... -coverprofile $(COVER_PROFILE) ./... | tee ${TEST_FILE}

install: manifests kustomize ##@Deployment Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand All @@ -75,7 +76,7 @@ certmanager: ##@Deployment Install certmanager v1.4.0 from github manifest to th
$(call installyaml,cert-manager,https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.yaml,cert-manager)

e2e: ginkgo ##@Testing Executes e2e tests inside test/e2e folder
$(GINKGO) -progress -v -tags e2e ./test/e2e
$(GINKGO) -progress -v -tags $(GO_VET_TAGS) ./test/e2e

CONTROLLER_GEN = $(TOOLBIN)/controller-gen
controller-gen: ##@Setup Download controller-gen locally if necessary.
Expand Down

0 comments on commit 4d76ff8

Please sign in to comment.