Commit 7956f540 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

GitLab CI

parent e457c6e8
Pipeline #6611 failed
image: maven:latest
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
# GIT_SUBMODULE_STRATEGY: recursive
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 "Building Debian package for $VERSION"
mvn $MAVEN_CLI_OPTS -U -Pdariah.deb -Dmaven.test.failure.ignore package
#if [[ $VERSION = *"SNAPSHOT" ]]; then
for i in *.deb; do
echo "Working $VERSION"
done
#fi
fi
#- mkdir build
#- find target/ -iname '*RELEASE*.deb' -exec echo "Processing RELEASE {}" \; -exec reprepro -b /srv/repository/ubuntu/ -C main includedeb stable {} \; #-exec mv {} build/ \;
#- find target/ -iname '*SNAPSHOT*.deb' -exec echo "Processing SNAPSHOT {}" \; -exec reprepro -b /srv/repository/ubuntu/ -C snapshot includedeb testing {} \;
only:
- master
# The files which are to be made available in GitLab
#artifacts:
# paths:
# - build/*
docs:
stage: docs
script:
- |
echo "Building documentation"
cd docs
echo "-- Setting up Virtualenv"
virtualenv venv
pwd
. venv/bin/activate
echo "-- Installing requirements"
pip install -r requirements.txt
echo "-- Building HTML version within $(pwd)"
make clean html
echo "-- Creating package"
VERSION=$(grep ^version conf.py | sed \'s/version = \'\\\'\'\\(.*\\)\'\\\'\'/\\1/g\')
fpm -t deb -a noarch -s dir --name dariah-de-cosmotool-doc \
--description='DARIAH-DE Cosmotool Documentation' \
--maintainer='DARIAH-DE <info@de.dariah.eu>' \
--vendor='DARIAH-DE' \
--url='https://cosmotool.de.dariah.eu' \
--iteration $(expr $BUILD_NUMBER + 299) \
--version $VERSION \
-x ".git**" \
-x "**/.git**" \
-x "**/.hg**" \
-x "**/.svn**" \
-x ".buildinfo" \
-x "**/*.deb" \
--prefix /var/www/doc/cosmotool \
-C _build/html .
\ 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