This repository was archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMakefile
66 lines (56 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 2021 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0
REGISTRY ?= ghcr.io/cilium/hubble-otel
WITHOUT_TAG_SUFFIX ?= false
PUSH ?= false
GOBIN = $(shell go env GOPATH)/bin
IMAGINE ?= $(GOBIN)/imagine
KG ?= $(GOBIN)/kg
ifeq ($(MAKER_CONTAINER),true)
IMAGINE=imagine
KG=kg
endif
test.compile-check:
for t in ./ ./common ./logs ./trace ; do go test -c $$t -o /dev/null ; done
cd ./receiver ; go test -c ./ -o /dev/null
test.run-all:
for dir in ./ ./receiver ; do cd $$dir ; go vet ./... && go test ./... ; done
.buildx_builder:
docker buildx create --platform linux/amd64 > $@
images.otelcol: .buildx_builder
$(IMAGINE) build \
--builder=$$(cat .buildx_builder) \
--base ./ \
--root \
--dockerfile=./images/otelcol/Dockerfile \
--upstream-branch=origin/main \
--name=otelcol \
--registry=$(REGISTRY) \
--without-tag-suffix=$(WITHOUT_TAG_SUFFIX) \
--push=$(PUSH)
$(IMAGINE) image \
--base=./ \
--root \
--upstream-branch=origin/main \
--name=otelcol \
--registry=$(REGISTRY) \
--without-tag-suffix=$(WITHOUT_TAG_SUFFIX) \
> image-otelcol.tag
images.hubble-otel: .buildx_builder
$(IMAGINE) build \
--builder=$$(cat .buildx_builder) \
--base ./ \
--root \
--upstream-branch=origin/main \
--name=hubble-otel \
--registry=$(REGISTRY) \
--without-tag-suffix=$(WITHOUT_TAG_SUFFIX) \
--push=$(PUSH)
$(IMAGINE) image \
--base=./ \
--root \
--upstream-branch=origin/main \
--name=hubble-otel \
--registry=$(REGISTRY) \
--without-tag-suffix=$(WITHOUT_TAG_SUFFIX) \
> image-otelcol.tag