feat: image streams are now optionally used.
@@ -10,6 +10,7 @@ function displayHelp() {
echo "The available options are:"
echo " --skip-tests Skips the test execution."
echo " --skip-image-builds Skips image builds."
+ echo " --with-image-streams Builds everything using image streams."
echo " --clean Cleans up the projects."
echo " --namespace N Specifies the namespace to use."
echo " --help Displays this help message."
@@ -48,6 +49,7 @@ function readopt() {
SKIP_TESTS=$(hasflag --skip-tests "$@" 2> /dev/null)
SKIP_IMAGE_BUILDS=$(hasflag --skip-image-builds "$@" 2> /dev/null)
CLEAN=$(hasflag --clean "$@" 2> /dev/null)
+WITH_IMAGE_STREAMS=$(hasflag --with-image-streams "$@" 2> /dev/null)
NAMESPACE=$(readopt --namespace "$@" 2> /dev/null)
@@ -89,6 +91,13 @@ if [ -z "$CLEAN" ];then
MAVEN_CLEAN_GOAL=""
fi
+if [ -n "$WITH_IMAGE_STREAMS" ]; then
+ echo "With image streams ..."
+ MAVEN_OPTS=" -Dfabric8.mode=openshift"
+else
+ MAVEN_OPTS=" -Dfabric8.mode=kubernetes"
+fi
+
git submodule init
git submodule update
@@ -119,6 +128,8 @@ pushd ui
yarn
yarn ng build -- --aot --prod --progress=false
if [ -z "$SKIP_IMAGE_BUILDS" ]; then
+
+ if [ -n "$WITH_IMAGE_STREAMS"]; then
BC_DETAILS=`oc get bc | grep syndesis-ui`
if [ -z $"BC_DETAILS" ]; then
cat docker/Dockerfile | oc new-build --dockerfile=- --to=syndesis/syndesis-ui:latest --strategy=docker $OC_OPTS
@@ -126,5 +137,8 @@ if [ -z "$SKIP_IMAGE_BUILDS" ]; then
tar -cvf archive.tar dist docker
oc start-build -F --from-archive=archive.tar syndesis-ui $OC_OPTS
rm archive.tar
+ else
+ docker build -t syndesis/syndesis-ui:latest -f docker/Dockerfile . | cat -
+ fi
fi
popd
