forked from submariner-io/shipyard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.dapper
29 lines (24 loc) · 962 Bytes
/
Makefile.dapper
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
# This Makefile contains the rules required to set up our
# Dapper-based build environment
ORG ?= submariner-io
PROJECT ?= $(notdir $(CURDIR))
SHIPYARD_TAG ?= $(BASE_BRANCH)
SHIPYARD_URL ?= https://raw.githubusercontent.com/submariner-io/shipyard/$(BASE_BRANCH)
export ORG PROJECT SHIPYARD_TAG SHIPYARD_URL
Makefile.shipyard:
@echo Downloading $@
@curl -sfLO $(SHIPYARD_URL)/$@
include Makefile.shipyard
# [prune-images] removes all Submariner-provided images and all untagged images
# Use this to ensure you use current images
# Copied from Makefile to provide this everywhere (until we can share
# non-Dapper goals across projects)
prune-images:
docker images | grep -E '(admiral|cloud-prepare|coastguard|lighthouse|nettest|shipyard|subctl|submariner|<none>)' | while read image tag hash _; do \
if [ "$$tag" != "<none>" ]; then \
docker rmi $$image:$$tag; \
else \
docker rmi $$hash; \
fi \
done
.PHONY: prune-images