Commit 40b16148 authored by Danijel Dragicevic's avatar Danijel Dragicevic

Added gitlab-ci file.

parent f9630d8f
image: maven:latest
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
deploy:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS deploy
only:
- master
\ No newline at end of file
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>central</id>
<username>${env.MAVEN_REPO_USER}</username>
<password>${env.MAVEN_REPO_PASS}</password>
</server>
</servers>
</settings>
\ No newline at end of file
......@@ -54,4 +54,17 @@
<version>2.3.0</version>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>central</id>
<name>artifactory.codecentric.de-releases</name>
<url>${env.MAVEN_REPO_URL}/public</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>artifactory.codecentric.de-snapshots</name>
<url>${env.MAVEN_REPO_URL}/public</url>
</snapshotRepository>
</distributionManagement>
</project>
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