/
che-deploy
executable file
·39 lines (27 loc) · 1.01 KB
/
che-deploy
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
#!/bin/sh
set -x
SCRIPT_DIR=$( dirname "${0}" )
# shellcheck source=env.sh
. "${SCRIPT_DIR}/env.sh"
PLATFORM=${1}
if [ -z "${PLATFORM}" ]; then
echo "need to set platform './che-deploy <platform>'"
exit 1
fi
CHE_IMAGE_PULL_POLICY=${CHE_IMAGE_PULL_POLICY:-Always}
sed "s%{{CHE_IMAGE_PULL_POLICY}}%${CHE_IMAGE_PULL_POLICY}%g; s%{{MINIKUBE_IP}}%${MINIKUBE_IP}%g" "${SCRIPT_DIR}/org_v1_che_cr.yaml_template" > /tmp/che_cr.yaml
EXTRA_ARGS=""
if [ -n "${CHE_IMAGE}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --cheimage=${CHE_IMAGE}"
fi
if [ -n "${CHEOP_IMAGE}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --che-operator-image=${CHEOP_IMAGE}"
fi
if [ "${CHEOP_TEMPLATES}" == "true" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --templates=/tmp/cheop-templates"
fi
if [ "${DEVWORKSPACE_ENGINE}" == "true" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --workspace-engine=dev-workspace"
fi
set -x
chectl server:deploy --platform=${PLATFORM} --installer=operator --chenamespace=${CHE_NAMESPACE} --che-operator-cr-patch-yaml=/tmp/che_cr.yaml ${EXTRA_ARGS}