blob: dc512066733ec2095f95d4d4f5e527121aecac7a [file] [log] [blame]
KGO := CGO_ENABLED=0 GOOS=linux go build
.PHONY: default
default: allgo
.PHONY: packages
packages:
go build -v ./go/...
# This is the quick version triggered by the presubmit script.
.PHONY: testgo
testgo:
go test ./go/... -short
.PHONY: bench
bench:
go test ./go/... -bench=. -run=NONE
.PHONY: test
test: go-test
true
.PHONY: go-test
go-test:
go test ./go/...
.PHONY: allgo
allgo:
go install -v ./cmd/...
.PHONY: k8s-release-baseline-server
k8s-release-baseline-server: build-static-baseline-server
./k8s_release_baseline_server
.PHONY: k8s-release-diffcalculator
k8s-release-diffcalculator: build-static-diffcalculator
./k8s_release_diffcalculator
.PHONY: k8s-release-gitilesfollower
k8s-release-gitilesfollower: build-static-gitilesfollower
./k8s_release_gitilesfollower
.PHONY: k8s-release-ingestion
k8s-release-ingestion: build-static-ingestion
./k8s_release_ingestion
.PHONY: k8s-release-periodictasks
k8s-release-periodictasks: build-static-periodictasks
./k8s_release_periodictasks
.PHONY: k8s-release-goldpushk-healthy-server
k8s-release-goldpushk-healthy-server: build-static-goldpushk-healthy-server
./k8s_release_goldpushk_healthy_server
.PHONY: k8s-release-goldpushk-crashing-server
k8s-release-goldpushk-crashing-server: build-static-goldpushk-crashing-server
./k8s_release_goldpushk_crashing_server
.PHONY: build-static-frontend
build-static-frontend: frontend
mkdir -p ./build
rm -f ./build/frontend_k8s
$(KGO) -o build/frontend_k8s -a ./cmd/gold_frontend/...
.PHONY: build-static-baseline-server
build-static-baseline-server:
mkdir -p ./build
rm -f ./build/baseline_server_k8s
$(KGO) -o build/baseline_server_k8s -a ./cmd/baseline_server/...
.PHONY: build-static-diffcalculator
build-static-diffcalculator:
mkdir -p ./build
rm -f ./build/diffcalculator_k8s
$(KGO) -o build/diffcalculator_k8s -a ./cmd/diffcalculator/...
.PHONY: build-static-gitilesfollower
build-static-gitilesfollower:
mkdir -p ./build
rm -f ./build/gitilesfollower_k8s
$(KGO) -o build/gitilesfollower_k8s -a ./cmd/gitilesfollower/gitilesfollower.go
.PHONY: build-static-ingestion
build-static-ingestion:
mkdir -p ./build
rm -f ./build/gold_ingestion_k8s
$(KGO) -o build/gold_ingestion_k8s -a ./cmd/gold_ingestion/...
.PHONY: build-static-periodictasks
build-static-periodictasks:
mkdir -p ./build
rm -f ./build/periodictasks_k8s
$(KGO) -o build/periodictasks_k8s -a ./cmd/periodictasks/...
.PHONY: build-static-goldpushk-healthy-server
build-static-goldpushk-healthy-server:
mkdir -p ./build
rm -f ./build/goldpushk_healthy_server_k8s
$(KGO) -o build/goldpushk_healthy_server_k8s -a ./cmd/goldpushk/testing/healthy_server/...
.PHONY: build-static-goldpushk-crashing-server
build-static-goldpushk-crashing-server:
mkdir -p ./build
rm -f ./build/goldpushk_crashing_server_k8s
$(KGO) -o build/goldpushk_crashing_server_k8s -a ./cmd/goldpushk/testing/crashing_server/...
# Build the gold-frontend container with Bazel and push it to GCR.
.PHONY: push_frontend_container
push_frontend_container:
bazel run //golden:push_gold_frontend_container
# Build the gold-baseline-server container with Bazel and push it to GCR.
.PHONY: push_baseline_server_container
push_baseline_server_container:
bazel run //golden:push_baseline_server_container
# Build the gold-diffcalculator container with Bazel and push it to GCR.
.PHONY: push_diffcalculator_container
push_diffcalculator_container:
bazel run //golden:push_diffcalculator_container
# Build the gold-gitilesfollower container with Bazel and push it to GCR.
.PHONY: push_gitilesfollower_container
push_gitilesfollower_container:
bazel run //golden:push_gitilesfollower_container
# Build the gold-ingestion container with Bazel and push it to GCR.
.PHONY: push_ingestion_container
push_ingestion_container:
bazel run //golden:push_gold_ingestion_container
# Build the gold-periodictasks container with Bazel and push it to GCR.
.PHONY: push_periodictasks_container
push_periodictasks_container:
bazel run //golden:push_periodictasks_container
.PHONY: mocks
mocks:
echo "Be sure to have downloaded mockery 2.4.0 from"
echo "https://github.com/vektra/mockery/releases"
echo "and put it on your PATH"
go generate ./...