-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
90 lines (64 loc) · 2.09 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
BASE_BRANCH ?= devel
GIT_EMAIL ?= release@submariner.io
GIT_NAME ?= Automated Release
SHELLCHECK_ARGS := scripts/*.sh scripts/lib/* scripts/test/*
export BASE_BRANCH
export GIT_EMAIL
export GIT_NAME
ifdef dryrun
$(warning [31mThe 'dryrun' variable is deprecated, please use 'DRY_RUN' instead.[0m)
export DRY_RUN ?= $(dryrun)
endif
ifneq (,$(DAPPER_SOURCE))
# Running in Dapper
include $(SHIPYARD_DIR)/Makefile.inc
export SETTINGS = $(DAPPER_SOURCE)/.shipyard.e2e.yml
_E2E_CANARY = E2E CANARY
E2E_NEEDED = $(shell . scripts/lib/utils && \
determine_target_release 2&> /dev/null && \
read_release_file && \
exit_on_branching && echo $(_E2E_CANARY))
config-git:
git config --global user.email "$(GIT_EMAIL)";\
git config --global user.name "$(GIT_NAME)"
subctl: config-git
./scripts/subctl.sh $(SUBCTL_ARGS)
ifneq (, $(findstring $(_E2E_CANARY),$(E2E_NEEDED)))
# TODO: Figure out how to dynamically load correct images
override PRELOAD_IMAGES=submariner-gateway submariner-route-agent submariner-globalnet submariner-operator
# Make sure that for E2E subctl gets compiled with the base branch, or it'll try to deploy images that werent published yet.
e2e: export DEFAULT_IMAGE_VERSION=$(BASE_BRANCH)
e2e: deploy
else
e2e:
@echo No release detected, not running E2E
endif
clusters: images subctl
images:
./scripts/images.sh
# [do-release] will run the release process for the current stage, creating tags and releasing images as needed
do-release: config-git
./scripts/do-release.sh
release: config-git
./scripts/release.sh
test-%: export SKIP_WHEN_TESTING=y
test-%: config-git
./scripts/test/$*.sh
validate:
./scripts/validate.sh
# This is requested by Shipyard but not needed
vendor/modules.txt: ;
else
# Not running in Dapper
Makefile.dapper:
@echo Downloading $@
@curl -sfLO https://raw.githubusercontent.com/submariner-io/shipyard/$(BASE_BRANCH)/$@
include Makefile.dapper
git-sync:
-git fetch --all --tags
release: git-sync
release: GIT_NAME = $(shell git config --get user.name)
release: GIT_EMAIL = $(shell git config --get user.email)
endif
# Disable rebuilding Makefile
Makefile: ;