fix: use oc tag in order to copy image stream tags to the test namespace.
@@ -60,6 +60,16 @@ fi
echo "Installing Syndesis in ${KUBERNETES_NAMESPACE} from: ${SYNDESIS_TEMPLATE_URL}"
oc project ${KUBERNETES_NAMESPACE}
+# If env variable `SYNDESIS_RELEASED_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"
+ for i in `oc get istag -n syndesis-ci | cut -f1 -d " " | grep -v NAME`;do oc tag syndesis-ci/$i ${KUBERNETES_NAMESPACE}/$i; done
+fi
+
oc create -f ${SYNDESIS_TEMPLATE_URL} -n ${KUBERNETES_NAMESPACE} || oc replace -f ${SYNDESIS_TEMPLATE_URL} -n ${KUBERNETES_NAMESPACE}
oc new-app ${SYNDESIS_TEMPLATE_TYPE} \
@@ -70,13 +80,3 @@ oc new-app ${SYNDESIS_TEMPLATE_TYPE} \
-p GITHUB_OAUTH_CLIENT_SECRET=${GITHUB_OAUTH_CLIENT_SECRET} \
-p OPENSHIFT_OAUTH_CLIENT_ID=$(oc project -q) \
-n ${KUBERNETES_NAMESPACE}
-
-# If env variable `SYNDESIS_RELEASED_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"
- oc export is -n syndesis-ci | oc apply -f - -n "${KUBERNETES_NAMESPACE}"
-fi
