forked from influxdata/telegraf
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.yn
20 lines (17 loc) · 919 Bytes
/
Makefile.yn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CACHE_DIR = $(CURDIR)/_cache
BUILD_DIR = $(CURDIR)/build
CONTAINER_GO_DIR = /go
CONTAINER_TELEGRAF_DIR = $(CONTAINER_GO_DIR)/src/github.com/influxdata/telegraf
container-packages:
docker run --rm \
--name docker-telegraf-build \
-v $(CURDIR):$(CONTAINER_TELEGRAF_DIR) \
-v $(CACHE_DIR)/go/pkg:$(CONTAINER_GO_DIR)/pkg \
registry.cn-beijing.aliyuncs.com/yunionio/telegraf-ci:1.16.6 \
/bin/bash -c "cd $(CONTAINER_TELEGRAF_DIR) && make clean && CGO_ENABLED=0 make package amd64=1 arm64=1 windows=1"
# /bin/bash -c "cd $(CONTAINER_TELEGRAF_DIR) && make clean && make deps && CGO_ENABLED=0 make package amd64=1 arm64=1 windows=1"
TELEGRAF_VERSION = release-1.19.2-7
docker-image:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/telegraf:$(TELEGRAF_VERSION) -f ./scripts/Dockerfile.telegraf .
docker-build-image: container-packages docker-image