ci(setup): Add switch to use released images
@@ -71,10 +71,16 @@ oc new-app ${SYNDESIS_TEMPLATE_TYPE} \
-p OPENSHIFT_OAUTH_CLIENT_ID=$(oc project -q) \
-n ${KUBERNETES_NAMESPACE}
-
+# If env variable `SYNDESIS_DOCKERHUB_IMAGES` IS provided by template will be used
+if [ -n "${SYNDESIS_RELEASED_IMAGES}" ]; then
+ echo "ImageStreams specified by template will be used"
+ # no op required
+else
# Move image streams (one by one) inside the test namespace
+ echo "ImageStreams from CI namespace will be used"
mkdir -p /tmp/syndesis-test-resources/
for i in `oc get is -n syndesis-ci | grep -v NAME | cut -d" " -f1`; do
oc export is $i -n syndesis-ci > /tmp/syndesis-test-resources/$i.yml
oc create -n "${KUBERNETES_NAMESPACE}" -f /tmp/syndesis-test-resources/$i.yml 2> /dev/null || oc replace -n "${KUBERNETES_NAMESPACE}" -f /tmp/syndesis-test-resources/$i.yml;
done
+fi
