Enable gitlab CI to build debian packages
This commit is contained in:
parent
bc7079a0be
commit
456290ca19
|
@ -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
|
|
@ -58,6 +58,14 @@ case $i in
|
|||
PACKAGE_VERSION="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-x=*|--debbuild-extra=*)
|
||||
DEBBUILD_EXTRA="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
--dput=*)
|
||||
DPUT="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
--default)
|
||||
DEFAULT=YES
|
||||
shift # past argument with no value
|
||||
|
@ -312,9 +320,11 @@ EOF
|
|||
if [ "$DEBSIGN_KEYID" != "" ]; then
|
||||
DEBUILD="$DEBUILD -k$DEBSIGN_KEYID"
|
||||
fi
|
||||
# Add any extra options specified on the CLI
|
||||
DEBUILD="$DEBUILD $DEBBUILD_EXTRA"
|
||||
eval $DEBUILD
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error status code is: $?"
|
||||
echo "Error status code is: $?"
|
||||
echo "Build failed.";
|
||||
exit $?;
|
||||
fi;
|
||||
|
@ -350,8 +360,10 @@ EOF
|
|||
dput $PPA $SC
|
||||
fi;
|
||||
else
|
||||
echo "dputting to $PPA";
|
||||
dput $PPA $SC
|
||||
if [ "$DPUT" != "no" ]; then
|
||||
echo "dputting to $PPA";
|
||||
dput $PPA $SC
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
done; # foreach distro
|
||||
|
|
Loading…
Reference in New Issue