forked from pluralsh/plural-artifacts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 1.17 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
APPS := $(shell ls -l | egrep '^d' | awk '{ print $$9 }')
JOBS := $(addprefix upload-,${APPS})
PG_APPS := airbyte airflow gitlab nocodb sentry superset hasura
PG_JOBS := $(addprefix sync-pg-,${PG_APPS})
.PHONY: help
help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
all: ${JOBS} ; echo "finished updating all apps"
sync-pgs: ${PG_JOBS} ; echo "synced pg resources"
sync-pg-%:
cp .plural/runbooks/db-scaling.xml $*/helm/$*/runbooks/db-scaling.xml
cp .plural/resources/postgres-secret-sync.yaml $*/helm/$*/templates/pgsync.yaml
import-operator:
kustomize build ../plural-operator/config/crd/ -o bootstrap/helm/bootstrap/crds
import-tigera:
cp -R ../calico/calico/_includes/charts/tigera-operator/crds/. bootstrap/helm/bootstrap/crds
cp -R ../calico/calico/_includes/charts/calico/crds/kdd/. bootstrap/helm/bootstrap/crds
rm bootstrap/helm/bootstrap/crds/calico
helm-dependencies-%: # syncs helm dependencies for a chart
dir=pwd
for D in ./$*/helm/* ; do \
cd $$dir$$D && helm dependency update && cd - ; \
done
upload-%: # uploads artifacts
plural apply -f $*/Pluralfile