Allow using a different branch of openshift-templates, if OPENSHIFT_TEMPLATES_GIT_COMMIT env var is present
#!/bin/bash
+if [ -z "${OPENSHIFT_TEMPLATES_GIT_COMMIT}" ]; then
+ BRANCH='master'
+else
+ BRANCH=${OPENSHIFT_TEMPLATES_GIT_COMMIT}
+fi
+
# We pass the namespace on each command individually, because when this script is run inside a pod, all commands default to the pod namespace (ignoring commands like `oc project` etc)
-echo "Installing Syndesis in ${KUBERNETES_NAMESPACE}"
+echo "Installing Syndesis in ${KUBERNETES_NAMESPACE} using templates branch ${BRANCH}"
oc project ${KUBERNETES_NAMESPACE}
-oc create -f https://raw.githubusercontent.com/syndesisio/openshift-templates/master/syndesis.yml -n ${KUBERNETES_NAMESPACE} || oc replace -f https://raw.githubusercontent.com/syndesisio/openshift-templates/master/syndesis.yml -n ${KUBERNETES_NAMESPACE}
+oc create -f https://raw.githubusercontent.com/syndesisio/openshift-templates/${BRANCH}/syndesis.yml -n ${KUBERNETES_NAMESPACE} || oc replace -f https://raw.githubusercontent.com/syndesisio/openshift-templates/${BRANCH}/syndesis.yml -n ${KUBERNETES_NAMESPACE}
oc new-app syndesis \
-p ROUTE_HOSTNAME=${KUBERNETES_NAMESPACE}.b6ff.rh-idev.openshiftapps.com \
