mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-15 17:50:49 +00:00
e7d272ad0f
Change the structure and naming of the make variables that control the container image name/tag that gets created. Default values and behavior stay the same, but, this change tries to make it easier to customize the build from command line. Also, document all the relevant make variables in readme.
26 lines
749 B
Makefile
26 lines
749 B
Makefile
.PHONY: all test
|
|
|
|
IMAGE_BUILD_CMD := docker build
|
|
|
|
VERSION := $(shell git describe --tags --dirty --always)
|
|
|
|
IMAGE_REGISTRY := quay.io/kubernetes_incubator
|
|
IMAGE_NAME := node-feature-discovery
|
|
IMAGE_TAG_NAME := $(VERSION)
|
|
IMAGE_REPO := $(IMAGE_REGISTRY)/$(IMAGE_NAME)
|
|
IMAGE_TAG := $(IMAGE_REPO):$(IMAGE_TAG_NAME)
|
|
|
|
|
|
all: image
|
|
|
|
image:
|
|
$(IMAGE_BUILD_CMD) --build-arg NFD_VERSION=$(VERSION) \
|
|
-t $(IMAGE_TAG) ./
|
|
|
|
mock:
|
|
mockery --name=FeatureSource --dir=source --inpkg --note="Re-generate by running 'make mock'"
|
|
mockery --name=APIHelpers --dir=pkg/apihelper --inpkg --note="Re-generate by running 'make mock'"
|
|
mockery --name=LabelerClient --dir=pkg/labeler --inpkg --note="Re-generate by running 'make mock'"
|
|
|
|
test:
|
|
go test ./cmd/... ./pkg/...
|