-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
32 lines (28 loc) · 1.2 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
WORKDIR=$(shell pwd)
#os linux or darwin
GOOS ?= linux
#arch amd64 or arm64
GOARCH ?= amd64
GO_BUILD= GO111MODULE=on CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -trimpath
DOCKER_REGISTRY ?= public.ecr.aws
DOCKER_REPO ?= ${DOCKER_REGISTRY}/vanus/connector
IMAGE_TAG ?= latest
DOCKER_BUILD_ARG= --build-arg TARGETARCH=$(GOARCH) --build-arg TARGETOS=$(GOOS)
DOCKER_PLATFORM ?= linux/amd64,linux/arm64
# make push-all-java-image DOCKER_REGISTRY=linkall.tencentcloudcr.com
push-all-java-image:
sh build/java/push-image.sh "${DOCKER_REPO}" "${IMAGE_TAG}" "${DOCKER_PLATFORM}"
push-all-go-image:
sh build/go/push-image.sh "${DOCKER_REPO}" "${IMAGE_TAG}" "${DOCKER_PLATFORM}"
push-java-image:
docker buildx build -t ${DOCKER_REPO}/${CONNECTOR}:${IMAGE_TAG} -f build/java/Dockerfile \
--platform ${DOCKER_PLATFORM} \
--build-arg connector=${CONNECTOR} \
--push .
# make push-go-image CONNECTOR=source-http
# make push-go-image DOCKER_REGISTRY=linkall.tencentcloudcr.com CONNECTOR=sink-feishu
push-go-image:
docker buildx build $(DOCKER_BUILD_ARG) -t ${DOCKER_REPO}/${CONNECTOR}:${IMAGE_TAG} -f build/go/Dockerfile \
--platform ${DOCKER_PLATFORM} \
--build-arg connector=${CONNECTOR} \
--push .