diff --git a/Makefile b/Makefile index d62ebf7fe..73c11967b 100644 --- a/Makefile +++ b/Makefile @@ -27,20 +27,20 @@ GOVERSION := 1.10.0-alpine PULSAR := $(GOBUILDDIR)/bin/pulsar$(shell go env GOEXE) GOASSETSBUILDER := $(GOBUILDDIR)/bin/go-assets-builder$(shell go env GOEXE) -DOCKERFILE := Dockerfile +DOCKERFILE := Dockerfile DOCKERTESTFILE := Dockerfile.test DOCKERDURATIONTESTFILE := tests/duration/Dockerfile -ifndef LOCALONLY +ifndef LOCALONLY PUSHIMAGES := 1 IMAGESHA256 := true else IMAGESHA256 := false endif -ifdef IMAGETAG +ifdef IMAGETAG IMAGESUFFIX := :$(IMAGETAG) -else +else IMAGESUFFIX := :dev endif @@ -88,8 +88,8 @@ TESTBINNAME := $(PROJECT)_test TESTBIN := $(BINDIR)/$(TESTBINNAME) DURATIONTESTBINNAME := $(PROJECT)_duration_test DURATIONTESTBIN := $(BINDIR)/$(DURATIONTESTBINNAME) -RELEASE := $(GOBUILDDIR)/bin/release -GHRELEASE := $(GOBUILDDIR)/bin/github-release +RELEASE := $(GOBUILDDIR)/bin/release +GHRELEASE := $(GOBUILDDIR)/bin/github-release TESTLENGTHOPTIONS := -test.short TESTTIMEOUT := 30m @@ -98,7 +98,7 @@ ifeq ($(LONG), 1) TESTTIMEOUT := 180m endif ifdef VERBOSE - TESTVERBOSEOPTIONS := -v + TESTVERBOSEOPTIONS := -v endif SOURCES := $(shell find $(SRCDIR) -name '*.go' -not -path './test/*') @@ -121,10 +121,14 @@ ARANGOSYNCTESTCTRLBINNAME := $(PROJECT)_sync_test_ctrl ARANGOSYNCTESTCTRLBIN := $(BINDIR)/$(ARANGOSYNCTESTCTRLBINNAME) .PHONY: all -all: check-vars build +all: check-vars verify-generated build +.PHONY: compile +compile: check-vars build + +# allall is now obsolete .PHONY: allall -allall: check-vars verify-generated build +allall: all # # Tip: Run `eval $(minikube docker-env)` before calling make if you're developing on minikube. @@ -191,7 +195,7 @@ ifdef PUSHIMAGES docker push $(OPERATORIMAGE) endif -# Manifests +# Manifests .PHONY: manifests manifests: $(GOBUILDDIR) @@ -217,12 +221,12 @@ run-unit-tests: $(SOURCES) $(REPOPATH)/pkg/util/k8sutil \ $(REPOPATH)/pkg/util/k8sutil/test \ $(REPOPATH)/pkg/util/probe \ - $(REPOPATH)/pkg/util/validation + $(REPOPATH)/pkg/util/validation $(TESTBIN): $(GOBUILDDIR) $(SOURCES) @mkdir -p $(BINDIR) CGO_ENABLED=0 go test -c -installsuffix netgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o $(TESTBIN) $(REPOPATH)/tests - + .PHONY: docker-test docker-test: $(TESTBIN) @@ -270,7 +274,7 @@ endif $(DURATIONTESTBIN): $(SOURCES) CGO_ENABLED=0 go build -installsuffix cgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o $(DURATIONTESTBINNAME) $(REPOPATH)/tests/duration - + .PHONY: docker-duration-test docker-duration-test: $(DURATIONTESTBIN) @@ -327,12 +331,12 @@ $(RELEASE): $(GOBUILDDIR) $(SOURCES) $(GHRELEASE) .PHONY: build-ghrelease build-ghrelease: $(GHRELEASE) -$(GHRELEASE): $(GOBUILDDIR) +$(GHRELEASE): $(GOBUILDDIR) GOPATH=$(GOBUILDDIR) go build -o $(GHRELEASE) github.com/aktau/github-release .PHONY: release-patch release-patch: $(RELEASE) - GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch + GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch .PHONY: release-minor release-minor: $(RELEASE) @@ -340,7 +344,7 @@ release-minor: $(RELEASE) .PHONY: release-major release-major: $(RELEASE) - GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major + GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major ## Kubernetes utilities @@ -363,7 +367,7 @@ redeploy-operator: delete-operator manifests kubectl apply -f $(MANIFESTPATHDEPLOYMENT) kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION) kubectl apply -f $(MANIFESTPATHTEST) - kubectl get pods + kubectl get pods ## ArangoSync Tests diff --git a/README.md b/README.md index 0d71406ea..baae5a455 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ helm install https://github.com/arangodb/kube-arangodb/releases/download/0.3.11/ ## Building ```bash -DOCKERNAMESPACE= make allall +DOCKERNAMESPACE= make kubectl apply -f manifests/arango-deployment-dev.yaml # To use `ArangoLocalStorage`, also run kubectl apply -f manifests/arango-storage-dev.yaml