Commit 96a3a5da authored by Matija Obreza's avatar Matija Obreza

Deploy maven artifacts

parent 9e60e69a
Pipeline #1047 passed with stage
in 56 seconds
<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>ossrh</id>
<username>${env.OSSRH_USER}</username>
<password>${env.OSSRH_PASS}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
image: maven:3-jdk-8
stages:
- compile
- deploy
build:
script: "mvn install -B"
run tests in branches:
stage: compile
image: maven:3-jdk-8
script:
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn test -B
except:
- master
- tags
artifacts:
paths:
- target/*.jar
publish artifacts:
stage: deploy
image: maven:3-jdk-8
script:
- echo "${GPG_KEY_SECRET}" | gpg --allow-secret-key-import --import
- gpg --list-keys
- mvn clean deploy --settings .ci-maven-settings.xml -B -U
only:
- master
- tags
......@@ -80,6 +80,9 @@
<application.blocks.version>1.1-SNAPSHOT</application.blocks.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<junit.version>4.12</junit.version>
<org.hamcrest.version>1.3</org.hamcrest.version>
<commons.io.version>2.4</commons.io.version>
......@@ -89,7 +92,7 @@
<hibernate.version>4.3.11.Final</hibernate.version>
<hsqldb.version>2.3.3</hsqldb.version>
</properties>
<repositories>
<repository>
<id>central</id>
......@@ -114,7 +117,7 @@
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<dependencies>
<!--Test dependencies -->
<dependency>
......@@ -175,7 +178,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
......@@ -257,6 +260,17 @@
<pushChanges>false</pushChanges>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment