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/19 10:24:23 UTC

[isis] branch master updated: ISIS-1904: updates gitlab build to push to interim nexus repo

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 59cf961  ISIS-1904: updates gitlab build to push to interim nexus repo
59cf961 is described below

commit 59cf961458f5fd86d4e939dccd5b9338600aab40
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 19 10:24:15 2018 +0000

    ISIS-1904: updates gitlab build to push to interim nexus repo
---
 .gitlab-ci.yml        | 12 +++++++++---
 core/.m2/settings.xml | 12 ++++++++++++
 core/pom.xml          | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 690b02d..f4c9374 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,9 @@
 #
 # requires the following gitlab secret variables
 #
+# - NEXUS_USERNAME
+# - NEXUS_PASSWORD
+# - NEXUS_REPO_URL
 # - DOCKER_REGISTRY_USERNAME
 # - DOCKER_REGISTRY_PASSWORD
 # - DOCKER_REGISTRY_EMAIL
@@ -34,9 +37,12 @@ build-package:
     - cd core
     - >
       mvn $MAVEN_CLI_OPTS \
-          clean install \
-          $CORE_ADDITIONAL_OPTS \
-          -Drevision=$REVISION
+          -s .m2/settings.xml \
+          clean deploy \
+          -Drevision=$REVISION \
+          -Dnexus-deploy \
+          -Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL \
+          $CORE_ADDITIONAL_OPTS
     - cd ..
     - cd example/application/simpleapp
     - >
diff --git a/core/.m2/settings.xml b/core/.m2/settings.xml
new file mode 100644
index 0000000..a2c42ef
--- /dev/null
+++ b/core/.m2/settings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+  <servers>
+    <server>
+      <id>nexus-deploy.serverId</id>
+      <username>${env.NEXUS_USERNAME}</username>
+      <password>${env.NEXUS_PASSWORD}</password>
+    </server>
+  </servers>
+</settings>
diff --git a/core/pom.xml b/core/pom.xml
index ecede54..2771e42 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -2234,6 +2234,52 @@ ${license.additional-notes}
             </build>
         </profile>
         <profile>
+            <!--
+            this profile allows builds to be deployed to an inhouse nexus repo.
+
+            export NEXUS_USERNAME=...
+            export NEXUS_PASSWORD=...
+            export NEXUS_REPO_URL=...
+
+            export REVISION=...
+
+            mvn clean deploy \
+                 -Drevision=$REVISION \
+                 -Dnexus-deploy \
+                 -s .m2/settings.xml \
+                 -Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL
+            -->
+            <id>nexus-deploy</id>
+            <activation>
+                <property>
+                    <name>nexus-deploy</name>
+                </property>
+            </activation>
+            <properties>
+                <nexus-deploy.repositoryUrl>http://localhost:8081/repository/builds</nexus-deploy.repositoryUrl>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.sonatype.plugins</groupId>
+                        <artifactId>nexus-staging-maven-plugin</artifactId>
+                        <version>1.6.8</version>
+                        <extensions>true</extensions>
+                        <configuration>
+                            <serverId>nexus-deploy.serverId</serverId>
+                            <skipStaging>true</skipStaging>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <distributionManagement>
+                <repository>
+                    <id>nexus-deploy.serverId</id>
+                    <url>${nexus-deploy.repositoryUrl}</url>
+                </repository>
+            </distributionManagement>
+        </profile>
+        <profile>
             <id>owasp</id>
             <activation>
                 <property>

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