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/23 14:30:52 UTC
[isis] branch master updated: ISIS-1904: updates gitlab CI settings
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
The following commit(s) were added to refs/heads/master by this push:
new 519eed9 ISIS-1904: updates gitlab CI settings
519eed9 is described below
commit 519eed9020dda400403d94354b7e9f3dcdfca57a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Mar 23 14:30:40 2018 +0000
ISIS-1904: updates gitlab CI settings
to create dev builds at repo.incode.cloud, hopefully
---
.gitlab-ci.yml | 33 +++++++++++++-------------
example/application/simpleapp/.gitlab-ci.yml | 23 +++++++++---------
example/application/simpleapp/.m2/settings.xml | 2 +-
3 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f4c9374..9677d5a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,10 @@
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
-#
+# - DOCKER_REGISTRY_NAME # eg "registry-1.docker.io" (for docker hub)
+ # or "docker-dev.incode.cloud" (eg a cloud-based nexus)
+# - DOCKER_REGISTRY_URL # eg "https://index.docker.io/v1/" (for docker hub)
+ # or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#
image: maven:3.5.3-jdk-8
@@ -22,39 +25,37 @@ services:
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
- MAVEN_CLI_OPTS: "--batch-mode"
- DOCKER_REGISTRY_ID: "docker-hub"
- DOCKER_REGISTRY_URL: "https://index.docker.io/v1/"
- DOCKER_REGISTRY_REPOSITORY: "simpleapp"
+ MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dskip.cloudbees-estatio-repositories -Dskip.sonatype-snapshots -Dskip.apache-snapshots"
+ APP_NAME: "simpleapp"
stages:
- - build-package
+ - build-package-push
-build-package:
- stage: build-package
+build-package-push:
+ stage: build-package-push
script:
- echo "REVISION=$REVISION"
- cd core
- >
- mvn $MAVEN_CLI_OPTS \
- -s .m2/settings.xml \
+ mvn -s .m2/settings.xml \
+ --batch-mode \
clean deploy \
-Drevision=$REVISION \
-Dnexus-deploy \
-Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL \
$CORE_ADDITIONAL_OPTS
- cd ..
- - cd example/application/simpleapp
+ - cd example/application/$APP_NAME
- >
- mvn $MAVEN_CLI_OPTS \
+ mvn --batch-mode \
install \
-Drevision=$REVISION \
-Disis.version=$REVISION \
-Dmavenmixin-docker \
- -Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY
+ -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
- >
- mvn $MAVEN_CLI_OPTS \
- -s .m2/settings.xml \
+ mvn -s .m2/settings.xml \
+ --batch-mode \
docker:push@push-image-tagged \
-pl webapp \
-Drevision=$REVISION \
@@ -63,7 +64,7 @@ build-package:
-Dskip.isis-swagger \
-Dmavenmixin-docker \
-Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY \
- -Ddocker-plugin.serverId=$DOCKER_REGISTRY_ID \
+ -Ddocker-plugin.serverId=docker-registry \
-Ddocker.registryUrl=$DOCKER_REGISTRY_URL
- cd ../../..
diff --git a/example/application/simpleapp/.gitlab-ci.yml b/example/application/simpleapp/.gitlab-ci.yml
index 8b1e37a..39dd3f9 100644
--- a/example/application/simpleapp/.gitlab-ci.yml
+++ b/example/application/simpleapp/.gitlab-ci.yml
@@ -3,9 +3,10 @@
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
-#
-# Adjust "DOCKER_REGISTRY_REPOSITORY" variable (below) to be the name of the repository in the specified registry.
-#
+# - DOCKER_REGISTRY_NAME # eg "registry-1.docker.io" (for docker hub)
+ # or "docker-dev.incode.cloud" (eg a cloud-based nexus)
+# - DOCKER_REGISTRY_URL # eg "https://index.docker.io/v1/" (for docker hub)
+ # or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#
image: maven:3.5.3-jdk-8
@@ -19,11 +20,8 @@ services:
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
- 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"
+ APP_NAME: "simpleapp"
stages:
- build-package-push
@@ -33,13 +31,14 @@ build-package-push:
script:
- echo "REVISION=$REVISION"
- >
- mvn $MAVEN_CLI_OPTS \
- clean install \
+ mvn --batch-mode \
+ install \
-Drevision=$REVISION \
-Dmavenmixin-docker \
- -Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY
+ -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
- >
- mvn $MAVEN_CLI_OPTS \
+ mvn -s .m2/settings.xml \
+ --batch-mode \
docker:push@push-image-tagged \
-pl webapp \
-Drevision=$REVISION \
@@ -47,6 +46,6 @@ build-package-push:
-Dskip.isis-swagger \
-Dmavenmixin-docker \
-Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY \
- -Ddocker-plugin.serverId=$DOCKER_REGISTRY_ID \
+ -Ddocker-plugin.serverId=docker-registry \
-Ddocker.registryUrl=$DOCKER_REGISTRY_URL
diff --git a/example/application/simpleapp/.m2/settings.xml b/example/application/simpleapp/.m2/settings.xml
index d481ccb..6038b0e 100644
--- a/example/application/simpleapp/.m2/settings.xml
+++ b/example/application/simpleapp/.m2/settings.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
- <id>${env.DOCKER_REGISTRY_ID}</id>
+ <id>docker-registry</id>
<username>${env.DOCKER_REGISTRY_USERNAME}</username>
<password>${env.DOCKER_REGISTRY_PASSWORD}</password>
<configuration>
--
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.