This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
63 lines (52 loc) · 1.73 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
TAG=$(shell cat chart/falco-mp/Chart.yaml | grep version: | sed 's/.*: //g')
APP_DEPLOYER_IMAGE=$(REGISTRY)/falco/deployer:$(TAG)
MINOR_TAG=$(shell echo $(TAG) | cut -d. -f1-2)
APP_DEPLOYER_IMAGE_MINOR=$(REGISTRY)/falco/deployer:$(MINOR_TAG)
FALCO_TAG=0.14.0
include ./app.Makefile
include ./crd.Makefile
include ./gcloud.Makefile
$(info ---- TAG = $(TAG))
$(info ---- MINOR_TAG = $(MINOR_TAG))
$(info ---- FALCO_TAG = $(FALCO_TAG))
APP_NAME ?= falco-testrun
APP_PARAMETERS ?= { \
"name": "$(APP_NAME)", \
"namespace": "$(NAMESPACE)", \
"image": "gcr.io/sysdig-monitor/falco:$(TAG)" \
}
app/build:: .build/falco \
.build/falco/deployer \
.build/falco/falco
.build/falco: | .build
mkdir -p "$@"
.build/falco/deployer: schema.yaml \
deployer/* \
chart/falco-mp/* \
chart/falco-mp/charts/falco-$(TAG).tgz \
chart/falco-mp/templates/* \
.build/var/REGISTRY
docker build \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg TAG=$(TAG) \
--build-arg MARKETPLACE_TOOLS_TAG="$(MARKETPLACE_TOOLS_TAG)" \
--tag "$(APP_DEPLOYER_IMAGE)" \
-f deployer/Dockerfile \
.
docker tag "$(APP_DEPLOYER_IMAGE)" "$(APP_DEPLOYER_IMAGE_MINOR)"
docker push "$(APP_DEPLOYER_IMAGE)"
docker push "$(APP_DEPLOYER_IMAGE_MINOR)"
@touch "$@"
.build/falco/falco: .build/var/REGISTRY \
.build/var/TAG \
| .build/falco
docker pull docker.io/falcosecurity/falco:$(FALCO_TAG)
docker tag docker.io/falcosecurity/falco:$(FALCO_TAG) \
"$(REGISTRY)/falco:$(TAG)"
docker tag docker.io/falcosecurity/falco:$(FALCO_TAG) \
"$(REGISTRY)/falco:$(MINOR_TAG)"
docker push "$(REGISTRY)/falco:$(TAG)"
docker push "$(REGISTRY)/falco:$(MINOR_TAG)"
@touch "$@"
chart/falco-mp/charts/falco-$(TAG).tgz:
helm dependency build chart/falco-mp