forked from element-hq/ess-starter-edition-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 1.27 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
# Copyright 2023-2024 New Vector Ltd
#
# SPDX-License-Identifier: AGPL-3.0-or-later
include common.mk
.PHONY: all
all: buildah-build
build-helm-charts:
cd helm/operator && BASE_CRD_KUSTOMIZE_TARGET=config/crd/cleanup/starter-core bash build.sh
cd helm/updater && ELEMENT_DEPLOYMENT_KUSTOMIZE_TARGET=config/crd/element-deployment/cleanup/starter-core bash build.sh
.PHONY: build-crds
build-crds: kustomize
mkdir -p ${ARTIFACT_DIR}
$(KUSTOMIZE) build config/crd/cleanup/starter-core | sed '/x-ui/d' > ${ARTIFACT_DIR}/crds.yml
.PHONY: build-crds-ui
build-crds-ui: kustomize
mkdir -p ${ARTIFACT_DIR}
$(KUSTOMIZE) build config/crd/element-deployment/cleanup/starter-core -o ${ARTIFACT_DIR}/crds-ui.yml
.PHONY: build-all-crds
build-all-crds: build-crds build-crds-ui
.PHONY: buildah-build
buildah-build: ## Build docker image with the manager.
buildah bud -t operator
buildah bud -t operator-conversion-webhook -f Dockerfile.operator conversion/
buildah bud -t updater -f Dockerfile.updater
buildah bud -t updater-conversion-webhook -f Dockerfile.updater conversion/
.PHONY: local-build
local-build:
docker buildx build --load --metadata-file operator-metadata.json -t operator .
docker buildx build --metadata-file updater-metadata.json --load -t updater -f Dockerfile.updater .