Commit 2204e9ed authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

GitLab CI

parent b540b619
Pipeline #6599 passed with stages
in 2 minutes and 31 seconds
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:
- VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- |
if [[ $VERSION = *"SNAPSHOT" || $VERSION = *"RELEASE" ]]; then
echo "Pushing $VERSION"
mvn $MAVEN_CLI_OPTS deploy
fi
only:
- master
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<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>
<username>${env.MAVEN_REPO_USER}</username>
<password>${env.MAVEN_REPO_PASS}</password>
<id>central</id>
</server>
<server>
<username>${env.MAVEN_REPO_USER}</username>
<password>${env.MAVEN_REPO_PASS}</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>dariah-release-proxy</name>
<url>https://minfba.de.dariah.eu/artifactory/dariah-release-proxy</url>
</repository>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshots</id>
<name>dariah-snapshot-proxy</name>
<url>https://minfba.de.dariah.eu/artifactory/dariah-snapshot-proxy</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>dariah-release-proxy</name>
<url>https://minfba.de.dariah.eu/artifactory/dariah-release-proxy</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshots</id>
<name>dariah-snapshot-proxy</name>
<url>https://minfba.de.dariah.eu/artifactory/dariah-snapshot-proxy</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
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