File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ cp -r "${ROOT_DIR}"/dashboards "${OUTPUT_DIR}"/
5050" ${TASKS_DIR} " /process_charts.sh OUTPUT_DIR=" ${OUTPUT_DIR} " VALUES_TYPE=" prod" # IMAGE_EXCLUDE_LIST=""
5151
5252# all basic chart pre-processing tasks
53- " ${TASKS_DIR} " /post_chart_process_0.sh " ${OUTPUT_DIR} "
53+ " ${TASKS_DIR} " /post_chart_process_0.sh OUTPUT_DIR= " ${OUTPUT_DIR} "
5454
5555# all extra post chart processing tasks for this profile should come here
5656# post_chart_process_1.sh
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ cp -r "${ROOT_DIR}"/dashboards "${OUTPUT_DIR}"/
4343" ${TASKS_DIR} " /process_charts.sh OUTPUT_DIR=" ${OUTPUT_DIR} " IMAGE_EXCLUDE_LIST=" quay.io/wire/federator" VALUES_TYPE=" demo"
4444
4545# all basic chart pre-processing tasks
46- " ${TASKS_DIR} " /post_chart_process_0.sh " ${OUTPUT_DIR} " VALUES_TYPE=" demo"
46+ " ${TASKS_DIR} " /post_chart_process_0.sh OUTPUT_DIR= " ${OUTPUT_DIR} " VALUES_TYPE=" demo"
4747
4848# --------------------------
4949# building admin host containers, has dependenct on the helm charts
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ cp -r "${ROOT_DIR}"/values "${OUTPUT_DIR}"/
5252" ${TASKS_DIR} " /process_charts.sh OUTPUT_DIR=" ${OUTPUT_DIR} " VALUES_TYPE=" demo" # IMAGE_EXCLUDE_LIST=""
5353
5454# all basic chart pre-processing tasks
55- " ${TASKS_DIR} " /post_chart_process_0.sh " ${OUTPUT_DIR} "
55+ " ${TASKS_DIR} " /post_chart_process_0.sh OUTPUT_DIR= " ${OUTPUT_DIR} "
5656
5757# all extra post chart processing tasks for this profile should come here
5858# post_chart_process_1.sh
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- if [[ ! $# -eq 1 ]]; then
5- echo " usage: $0 OUTPUT-DIR" >&2
4+ # Default output dir
5+ OUTPUT_DIR=" "
6+ # Default values type will expect to use prod values
7+ VALUES_TYPE=" prod"
8+
9+ # Parse the arguments
10+ for arg in " $@ "
11+ do
12+ case $arg in
13+ OUTPUT_DIR=* )
14+ OUTPUT_DIR=" ${arg#* =} "
15+ ;;
16+ VALUES_TYPE=* )
17+ VALUES_TYPE=" ${arg#* =} "
18+ ;;
19+ * )
20+ echo " Unknown argument: $arg " >&2
21+ exit 1
22+ ;;
23+ esac
24+ done
25+
26+
27+ # Check if OUTPUT_DIR is set
28+ if [[ -z " $OUTPUT_DIR " ]]; then
29+ echo " usage: $0 OUTPUT_DIR=\" values-dir\" [VALUES_TYPE=\" prod|demo\" ]" >&2
630 exit 1
731fi
832
9- OUTPUT_DIR=" $1 "
10-
11- echo " Running post-chart process script 0 in dir ${OUTPUT_DIR} ..."
33+ echo " Running post-chart process script 0 in dir $OUTPUT_DIR with values type $VALUES_TYPE "
1234
1335# Undo changes on wire-server values.yaml
1436sed -i -Ee ' s/useSharedFederatorSecret: true/useSharedFederatorSecret: false/' " ${OUTPUT_DIR} " /charts/wire-server/charts/federator/values.yaml
15- sed -i -Ee ' s/federation: true/federation: false/' " ${OUTPUT_DIR} " /values/wire-server/prod -values.example.yaml
37+ sed -i -Ee ' s/federation: true/federation: false/' " ${OUTPUT_DIR} " /values/wire-server/${VALUES_TYPE} -values.example.yaml
You can’t perform that action at this time.
0 commit comments