Commit 6f79aa33 authored by Denis Konovalyenko's avatar Denis Konovalyenko

Moved to maven build.

parent 6691710f
image: maven:3.5.4-jdk-8
stages:
- build
- test
- deploy_snapshot
- deploy_release
- ci_status
unit-tests:
variables:
MAVEN_CLI_OPTS: "-s ci/gitlab/.m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=ci/gitlab/.m2/repository"
cache:
paths:
- ci/gitlab/.m2/repository/
- target/
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
deploy_snaphot:
stage: deploy_snapshot
script:
- echo "${GPG_KEY_SECRET}" | gpg --allow-secret-key-import --import
- gpg --list-keys
- mvn $MAVEN_CLI_OPTS deploy -DskipITs -Dmaven.test.skip=true -q -U -P release,sign_and_deploy
except:
- tags
- master
deploy_release:
stage: deploy_release
script:
- echo "Success. Add your tests!"
- echo "${GPG_KEY_SECRET}" | gpg --allow-secret-key-import --import
- gpg --list-keys
- mvn $MAVEN_CLI_OPTS deploy -DskipITs -Dmaven.test.skip=true -q -U -P release,sign_and_deploy
only:
- tags
except:
- branches
success:
stage: ci_status
......
<?xml version="1.0"?>
<settings>
<servers>
<server>
<id>nexus</id>
<username>${env.MAVEN_REPO_USER}</username>
<password>${env.MAVEN_REPO_PASS}</password>
</server>
</servers>
<profiles>
<profile>
<id>SUREFIRE-1588</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</properties>
</profile>
</profiles>
</settings>
......@@ -44,14 +44,14 @@
<distributionManagement>
<repository>
<id>ossrh</id>
<id>releases</id>
<name>Nexus Releases</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>http://91.211.13.180:8081/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<id>snapshots</id>
<name>Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>http://91.211.13.180:8081/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
......@@ -195,8 +195,8 @@
</execution>
</executions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<serverId>nexus</serverId>
<nexusUrl>http://91.211.13.180:8081/</nexusUrl>
<!-- Set this to true and the release will automatically proceed and sync to Central Repository will follow -->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
......
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