-
Notifications
You must be signed in to change notification settings - Fork 5
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 #21 from konnase/main
refactor job spec
- Loading branch information
Showing
68 changed files
with
13,182 additions
and
11,081 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ name: Release | |
on: [push] | ||
|
||
env: | ||
version: v1.0.0 | ||
version: v1.1.0 | ||
|
||
jobs: | ||
docker: | ||
|
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
|
||
# di-operator version | ||
VERSION ?= v1.0.0 | ||
APP_VERSION ?= 0.1.0 | ||
VERSION ?= v1.1.0 | ||
MASTER_VERSION := $(VERSION) | ||
|
||
COMMIT_SHORT_SHA=$(shell git log -n 1 | head -n 1 | sed -e 's/^commit //' | head -c 8) | ||
|
@@ -55,7 +56,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust | |
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=di-operator-cluster-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases | ||
cd config/manager && $(KUSTOMIZE) edit set image ${IMG_BASE}=${MASTER_IMG} | ||
./hack/update-image-tags.sh config/manager ${MASTER_VERSION} | ||
./hack/update-version.sh ${MASTER_VERSION} | ||
./hack/update-version.sh ${MASTER_VERSION} ${APP_VERSION} | ||
## generate installer scripts | ||
$(KUSTOMIZE) build config/default > config/di-manager.yaml | ||
|
||
|
@@ -66,7 +67,8 @@ dev-manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and | |
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=di-operator-cluster-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases | ||
cd config/manager && $(KUSTOMIZE) edit set image ${IMG_BASE}=${IMG} | ||
./hack/update-image-tags.sh config/manager ${VERSION} | ||
./hack/update-version.sh ${VERSION} | ||
./hack/update-version.sh ${VERSION} ${APP_VERSION} | ||
$(KUSTOMIZE) build config/default > config/di-manager.yaml | ||
|
||
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. | ||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | ||
|
@@ -78,7 +80,8 @@ vet: ## Run go vet against code. | |
go vet ./... | ||
|
||
# Run golangci-lint | ||
lint: | ||
# lint: golangci-lint | ||
lint: | ||
golangci-lint run -v --timeout=5m | ||
|
||
.PHONY: test | ||
|
@@ -89,6 +92,10 @@ test: ginkgo ## Run tests. | |
go tool cover -func=./pkg/common/coverage.out | ||
go tool cover -func=./pkg/controllers/coverage.out | ||
|
||
.PHONY: test-e2e | ||
test-e2e: ginkgo dev-deploy ## Run e2e tests | ||
${GINKGO} -cover ./test/e2e | ||
|
||
##@ Build | ||
|
||
build: generate ## Build di-operator binary. | ||
|
@@ -140,6 +147,10 @@ GINKGO = $(shell pwd)/bin/ginkgo | |
ginkgo: ## Download ginkgo locally if necessary. | ||
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/[email protected]) | ||
|
||
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint | ||
golangci-lint: ## Download golangci-lint locally if necessary. | ||
$(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/[email protected]) | ||
|
||
# go-get-tool will 'go get' any package $2 and install it to $1. | ||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
define go-get-tool | ||
|
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
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
Oops, something went wrong.