You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/03/15 17:35:08 UTC

[isis] 01/05: ISIS-1904: extends gitlab ci to push image of simpleapp to dockerhub

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

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

commit 6f35ce1136bfba3441bee6acc33c0d76a48b9783
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Mar 15 15:53:07 2018 +0000

    ISIS-1904: extends gitlab ci to push image of simpleapp to dockerhub
---
 .gitlab-ci.yml | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bdd1d48..3c5028a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,12 @@
+#
+# requires the following gitlab secret variables
+#
+# - DOCKER_REGISTRY_USERNAME
+# - DOCKER_REGISTRY_PASSWORD
+# - DOCKER_REGISTRY_EMAIL
+#
+#
+
 image: maven:3.5.3-jdk-8
 
 before_script:
@@ -10,7 +19,11 @@ services:
 variables:
   DOCKER_HOST: tcp://docker:2375
   DOCKER_DRIVER: overlay2
-  MAVEN_CLI_OPTS: "--batch-mode"
+  MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
+  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dskip.cloudbees-estatio-repositories -Dskip.sonatype-snapshots -Dskip.apache-snapshots"
+  DOCKER_REGISTRY_ID: "docker-hub"
+  DOCKER_REGISTRY_URL: "https://index.docker.io/v1/"
+  DOCKER_REGISTRY_REPOSITORY: "simpleapp"
 
 stages:
   - build-package
@@ -32,7 +45,19 @@ build-package:
           -Drevision=$REVISION \
           -Disis.version=$REVISION \
           -Dmavenmixin-docker \
-          -Ddocker-plugin.imageName=isis/simpleapp
+          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY
+    - >
+      mvn $MAVEN_CLI_OPTS \
+          docker:push@push-image-tagged \
+          -pl webapp \
+          -Drevision=$REVISION \
+          -Disis.version=$REVISION \
+          -DskipTests \
+          -Dskip.isis-swagger \
+          -Dmavenmixin-docker \
+          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY \
+          -Ddocker-plugin.serverId=$DOCKER_REGISTRY_ID \
+          -Ddocker.registryUrl=$DOCKER_REGISTRY_URL
     - cd ../../..
 
 

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.