Enable gitlab CI to build debian packages

This commit is contained in:
anon8675309 2021-05-23 01:45:07 -05:00 committed by Isaac Connor
parent bc7079a0be
commit 456290ca19
2 changed files with 32 additions and 3 deletions

17
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,17 @@
default:
image:
name: ubuntu:latest
before_script:
- apt-get update -yq
- DEBIAN_FRONTEND=noninteractive apt-get install -yq devscripts sudo
deb:
stage: build
tags:
- docker
script:
- yes "" | ./utils/do_debian_package.sh --snapshot=stable --branch=1.36.1 --type=binary --interactive=no --dput=no --debbuild-extra=--no-sign || true
artifacts:
paths:
- '*.deb'
expire_in: 1 week

View File

@ -58,6 +58,14 @@ case $i in
PACKAGE_VERSION="${i#*=}" PACKAGE_VERSION="${i#*=}"
shift shift
;; ;;
-x=*|--debbuild-extra=*)
DEBBUILD_EXTRA="${i#*=}"
shift
;;
--dput=*)
DPUT="${i#*=}"
shift
;;
--default) --default)
DEFAULT=YES DEFAULT=YES
shift # past argument with no value shift # past argument with no value
@ -312,6 +320,8 @@ EOF
if [ "$DEBSIGN_KEYID" != "" ]; then if [ "$DEBSIGN_KEYID" != "" ]; then
DEBUILD="$DEBUILD -k$DEBSIGN_KEYID" DEBUILD="$DEBUILD -k$DEBSIGN_KEYID"
fi fi
# Add any extra options specified on the CLI
DEBUILD="$DEBUILD $DEBBUILD_EXTRA"
eval $DEBUILD eval $DEBUILD
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error status code is: $?" echo "Error status code is: $?"
@ -350,10 +360,12 @@ EOF
dput $PPA $SC dput $PPA $SC
fi; fi;
else else
if [ "$DPUT" != "no" ]; then
echo "dputting to $PPA"; echo "dputting to $PPA";
dput $PPA $SC dput $PPA $SC
fi; fi;
fi; fi;
fi;
done; # foreach distro done; # foreach distro
if [ "$INTERACTIVE" != "no" ]; then if [ "$INTERACTIVE" != "no" ]; then