Commit c1a5a9e7 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

GitLab CI

parent 19c7ad30
Pipeline #6631 failed with stages
in 16 seconds
......@@ -23,30 +23,37 @@ 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
cd target
for f in *.deb; do
if [[ ! -e "$f" ]]; then continue; fi
debversion="$(dpkg-deb -f $f Version)"
package="$(dpkg-deb -f $f Package)"
echo "Found built package $package $debversion"
#- 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 {} \;
if [[ $debversion = *"SNAPSHOT" ]]; then
component="snapshot"
codename="testing"
else
component="main"
codename="stable"
fi
REPPACKAGE="$(reprepro -b $REPREPRO_BASE -C $component listfilter $codename 'Package (==$package), Version (==$debversion)')"
if [ ! -z "$REPPACKAGE" ]; then
echo "Pushing new package to Debian repository: $package $debversion"
reprepro -b $REPREPRO_BASE -C $component includedeb $codename $f
fi
done
fi
only:
- master
# The files which are to be made available in GitLab
#artifacts:
# paths:
# - build/*
docs:
stage: deploy
only:
......@@ -86,13 +93,26 @@ docs:
-C _build/html .
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
if [[ ! -e "$f" ]]; then continue; fi
debversion="$(dpkg-deb -f $f Version)"
package="$(dpkg-deb -f $f Package)"
echo "Found built package $package $debversion"
if [[ $debversion = *"SNAPSHOT" ]]; then
component="snapshot"
codename="testing"
else
component="main"
codename="stable"
fi
REPPACKAGE="$(reprepro -b $REPREPRO_BASE -C $component listfilter $codename 'Package (==$package), Version (==$debversion)')"
if [ ! -z "$REPPACKAGE" ]; then
echo "Pushing new package to Debian repository: $package $debversion"
reprepro -b $REPREPRO_BASE -C $component includedeb $codename $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