setup.sh now supports using templates from filesystem rather than github.
#!/bin/bash
-if [ -z "${OPENSHIFT_TEMPLATES_GIT_COMMIT}" ]; then
- BRANCH='master'
+if [ -z "${OPENSHIFT_TEMPLATE_FROM_WORKSPACE}" ]; then
+ TEMPLATE_URL="file:///${WORKSPACE}/syndesis.yml"
+elif [ -z "${OPENSHIFT_TEMPLATES_FROM_GITHUB_COMMIT}" ]; then
+ TEMPLATE_URL="https://raw.githubusercontent.com/syndesisio/openshift-templates/${OPENSHIFT_TEMPLATES_GIT_COMMIT}/syndesis.yml"
else
- BRANCH=${OPENSHIFT_TEMPLATES_GIT_COMMIT}
+ TEMPLATE_URL="https://raw.githubusercontent.com/syndesisio/openshift-templates/master/syndesis.yml"
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} using templates branch ${BRANCH}"
+echo "Installing Syndesis in ${KUBERNETES_NAMESPACE} from: ${TEMPLATE_URL}"
oc project ${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 create -f ${TEMPLATE_URL} -n ${KUBERNETES_NAMESPACE} || oc replace -f ${TEMPLATE_URL} -n ${KUBERNETES_NAMESPACE}
oc new-app syndesis \
-p ROUTE_HOSTNAME=${KUBERNETES_NAMESPACE}.b6ff.rh-idev.openshiftapps.com \
