Commit 19c7ad30 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

GitLab CI

parent 7956f540
Pipeline #6612 failed with stages
in 18 seconds
......@@ -48,38 +48,51 @@ deploy:
# - build/*
docs:
stage: docs
stage: deploy
only:
- master
script:
- |
echo "Building documentation"
cd docs
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ $VERSION = *"SNAPSHOT" || $VERSION = *"RELEASE" ]]; then
echo "Building documentation for v$VERSION"
cd docs
echo "-- Setting up Virtualenv"
virtualenv venv
pwd
. venv/bin/activate
echo "-- Setting up Virtualenv"
virtualenv venv
pwd
. venv/bin/activate
echo "-- Installing requirements"
pip install -r requirements.txt
echo "-- Installing requirements"
pip install -r requirements.txt
echo "-- Building HTML version within $(pwd)"
make clean html
echo "-- Building HTML version within $(pwd)"
make clean html
echo "-- Creating package"
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' \
--version $VERSION \
-x ".git**" \
-x "**/.git**" \
-x "**/.hg**" \
-x "**/.svn**" \
-x ".buildinfo" \
-x "**/*.deb" \
--prefix /var/www/doc/cosmotool \
-C _build/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
echo "Deploying debian package"
for f in *.deb; do
if [[ $VERSION = *"SNAPSHOT" ]]; then
reprepro -b /srv/repository/ubuntu/ -C snapshot includedeb testing $f
else
reprepro -b /srv/repository/ubuntu/ -C main includedeb stable $f
fi
done
fi
\ 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