-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (36 loc) · 1.72 KB
/
Makefile
File metadata and controls
43 lines (36 loc) · 1.72 KB
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
#!/usr/bin/make -f
#
# SPDX-FileCopyrightText: the secureCodeBox authors
#
# SPDX-License-Identifier: Apache-2.0
#
include_guard = set
hook = persistence-elastic
include ../../hooks.mk
docker-build: dashboard-importer-docker-build
docker-export: dashboard-importer-docker-export
kind-import: dashboard-importer-kind-import
.PHONY: dashboard-importer-docker-build
dashboard-importer-docker-build:
@echo ".: ⚙️ Build '$(name)' dashboard-importer with BASE_IMG_TAG: '$(BASE_IMG_TAG)'."
docker build \
--build-arg=scannerVersion=$(shell yq e .appVersion ./Chart.yaml) \
--build-arg=baseImageTag=$(BASE_IMG_TAG) \
--build-arg=namespace=$(IMG_NS) \
-t $(IMG_NS)/$(name)-dashboard-importer:$(IMG_TAG) \
-f ./dashboard-importer/Dockerfile \
./dashboard-importer
.PHONY: dashboard-importer-docker-export
dashboard-importer-docker-export:
@echo ".: ⚙️ Saving new docker image archive to '$(name)-dashboard-importer.tar'."
docker save $(IMG_NS)/$(name)-dashboard-importer:$(IMG_TAG) -o $(name)-dashboard-importer.tar
.PHONY: dashboard-importer-kind-import
dashboard-importer-kind-import:
@echo ".: 💾 Importing the image archive '$(name)-dashboard-importer.tar' to local kind cluster."
kind load image-archive ./$(name)-dashboard-importer.tar --name $(KIND_CLUSTER_NAME)
deploy: ## 💾 Deploy this module via HelmChart into namespace "integration-tests"
@echo ".: 💾 Deploying '$(name)' $(hook-prefix) HelmChart with the docker tag '$(IMG_TAG)' into kind namespace 'integration-tests'."
helm -n integration-tests upgrade --install $(name) . --debug --timeout 5m --wait \
--set="hook.image.repository=docker.io/$(IMG_NS)/$(hook-prefix)-$(name)" \
--set="hook.image.tag=$(IMG_TAG)" \
--set="dashboardImporter.image.tag=$(IMG_TAG)"