forked from elastic/golang-crossbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
33 lines (28 loc) · 1.1 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
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.60
NPCAP_FILE := npcap-$(NPCAP_VERSION)-oem.exe
SUFFIX_NPCAP_VERSION := -npcap-$(NPCAP_VERSION)
NPCAP_REPOSITORY := docker.elastic.co/observability-ci
# Requires login at google storage.
copy-npcap: status=".status.copy-npcap"
copy-npcap:
@echo '0' > ${status}
ifeq ($(CI),true)
@gsutil cp gs://obs-ci-cache/private/$(NPCAP_FILE) ../npcap/lib/$(NPCAP_FILE) || echo '1' > ${status}
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)"