You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/10/30 14:35:28 UTC

[isis] branch master updated: ISIS-2455: always build the docker images (but only push when a flag is set)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b4da3e  ISIS-2455: always build the docker images (but only push when a flag is set)
6b4da3e is described below

commit 6b4da3e7c543ecf1edcddc0f68939892030ac570
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Oct 30 15:35:10 2020 +0100

    ISIS-2455: always build the docker images (but only push when a flag is
    set)
---
 scripts/ci/build-artifacts.sh | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/scripts/ci/build-artifacts.sh b/scripts/ci/build-artifacts.sh
index 6fa3ef5..e91f3f0 100644
--- a/scripts/ci/build-artifacts.sh
+++ b/scripts/ci/build-artifacts.sh
@@ -22,6 +22,14 @@ if [ -z "$BATCH_MODE_FLAG" ] || [ "$BATCH_MODE_FLAG" != "off" ]; then
   BATCH_MODE=--batch-mode
 fi
 
+if [ -z "$JIB_PUSH_FLAG" ] || [ "$JIB_PUSH_FLAG" != "on" ]; then
+  #DRYRUN
+  JIB_MODE=buildTar
+else
+  #PUSH (JIB_PUSH_FLAG = on)
+  JIB_MODE=build
+fi
+
 SCRIPT_DIR=$( dirname "$0" )
 if [ -z "$PROJECT_ROOT_PATH" ]; then
   PROJECT_ROOT_PATH=`cd $SCRIPT_DIR/../.. ; pwd`
@@ -36,6 +44,24 @@ fi
 
 sh $SCRIPT_DIR/_print-environment.sh "build-artifacts"
 
+### FUNCTIONS
+
+function buildDockerImage() {
+	local dir=${1}
+	
+	cd $PROJECT_ROOT_PATH/${dir}
+	
+	mvn --batch-mode \
+    	compile jib:$JIB_MODE \
+    	-Dmaven.source.skip=true \
+    	-Dskip.git \
+    	-Dskip.arch \
+    	-DskipTests
+		    
+}
+
+### MAIN
+
 if [ ! -z "$REVISION" ]; then
 
   echo ""
@@ -104,6 +130,10 @@ mvn -s $SETTINGS_XML \
     | fgrep --line-buffered -v "[INFO] No site descriptor found: nothing to attach." \
     | fgrep --line-buffered -v "[INFO] Skipping because packaging 'jar' is not pom."
 
+# now build the individual docker images
+buildDockerImage examples/demo/wicket 
+buildDockerImage examples/demo/vaadin
+
 if [ ! -z "$REVISION" ]; then
   cd $PROJECT_ROOT_PATH
   echo ""