-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
51 lines (42 loc) · 1.65 KB
/
mise.toml
File metadata and controls
51 lines (42 loc) · 1.65 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
44
45
46
47
48
49
50
51
[tools]
helm = "latest"
kind = "latest"
kubectl = "1.33"
yq = "latest"
[env]
CLUSTER_NAME = "bonfire-test"
KIND_VERSION = "v1.33.4"
BONFIRE_CHART_NAME = "bonfire-test"
POSTGRES_CHART_NAME = "bonfire-database"
[tasks.lint]
run = "helm lint charts/bonfire"
[tasks.test]
depends = ['deploy-chart']
run = '''
helm test $BONFIRE_CHART_NAME
'''
[tasks.clean]
run = '''
kind delete cluster --name "$CLUSTER_NAME"
'''
[tasks.deploy-chart]
depends = ['ensure-kind-cluster', 'deploy-latest-bitnami-postgres']
run = '''
# The upstream image only has amd64 and arm64 flavours
HOST_ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/arm64/aarch64/')
helm upgrade --install --wait \
$BONFIRE_CHART_NAME charts/bonfire \
--set image.flavour="open_science" --set image.arch="$HOST_ARCH" \
--set postgres.host="$POSTGRES_CHART_NAME-postgresql.default.svc.cluster.local" \
--set "ingress.enabled=true" \
--set postgres.password="$(kubectl get secrets $POSTGRES_CHART_NAME-postgresql -o yaml | yq '.data["postgres-password"]' | base64 -d)"
'''
[tasks.deploy-latest-bitnami-postgres]
depends = ['ensure-kind-cluster']
run = 'helm upgrade --install --wait $POSTGRES_CHART_NAME oci://registry-1.docker.io/bitnamicharts/postgresql'
[tasks.ensure-kind-cluster]
run = '''
(kind get clusters | grep "$CLUSTER_NAME" > /dev/null) || kind create cluster --config kind_cluster_config.yaml --name "$CLUSTER_NAME" --image "kindest/node:$KIND_VERSION"
# install ingress
(kubectl get -n ingress-nginx pod --selector=app.kubernetes.io/component=controller -o json | jq -e '.items | length > 0') || kubectl apply --wait -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
'''