Files
kubevela/Makefile
Zheng Xi Zhou 79d3d3c446 Implement env APIs (#164)
* Implement API `api/envs/default/apps/

implement API `api/envs/default/apps/ and refactor code

* address comments from @wonderflow and @ryan

* fix code rebase issue

* Implement env APIs

implemented APIs for env and make api-test
and e2e-setup

* fix ci issues

* address comments
2020-08-18 18:15:28 +08:00

56 lines
1.2 KiB
Makefile

# Vela version
VELA_VERSION ?= 0.1.0
# Repo info
GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
all: build
# Run tests
test: fmt vet
go test ./pkg/... -coverprofile cover.out
# Build manager binary
build: fmt vet
go build -ldflags "-X github.com/cloud-native-application/rudrx/version.VelaVersion=${VELA_VERSION} -X github.com/cloud-native-application/rudrx/version.GitRevision=${GIT_COMMIT}" -o bin/vela cmd/vela/main.go
# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet
go run ./cmd/server/main.go
# Run go fmt against code
fmt:
go fmt ./...
# Run go vet against code
vet:
go vet ./...
# Build the docker image
docker-build: test
docker build . -t ${IMG}
# Push the docker image
docker-push:
docker push ${IMG}
e2e-setup:
ginkgo -v -r e2e/setup
/tmp/vela dashboard & # Somehow API server service doesn't start during setup in Github environment
e2e-test:
# Run e2e test
ginkgo -v -r e2e -skipPackage setup,apiserver
e2e-api-test:
# Run e2e test
ginkgo -v -r e2e/apiserver
e2e-cleanup:
# Clean up