forked from elastic/golang-crossbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
39 lines (32 loc) · 1.17 KB
/
Makefile.common
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
REPOSITORY ?= docker.elastic.co/beats-dev
VCS_REF := $(shell git rev-parse HEAD)
VCS_URL := https://github.com/elastic/golang-crossbuild
BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
.DEFAULT_GOAL := build
NPCAP_VERSION := 1.79
NPCAP_FILE := npcap-$(NPCAP_VERSION)-oem.exe
SUFFIX_NPCAP_VERSION := -npcap-$(NPCAP_VERSION)
NPCAP_REPOSITORY := docker.elastic.co/observability-ci
GS_BUCKET_PATH ?= ingest-buildkite-ci
ifeq ($(BUILDX),1)
ifeq ($(shell test $(DEBIAN_VERSION) -ge 10; echo $$?),0)
DOCKER_MULTIARCH := 1
endif
endif
# Requires login at google storage.
copy-npcap:
ifeq ($(CI),true)
@gsutil cp gs://$(GS_BUCKET_PATH)/private/$(NPCAP_FILE) ../npcap/lib/$(NPCAP_FILE)
else
@echo 'Only available if running in the CI'
endif
push:
$(MAKE) atomic-push
push-arm:
@echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)"
@docker push "$(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)"
.PHONY: push push-arm
# Requires login at https://docker.elastic.co:7000/.
atomic-push:
@echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)"
@docker push "$(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)"