debuild fixes

This commit is contained in:
Juan Ferrer 2020-01-16 17:28:42 +01:00
parent 666827b109
commit 2821af34b6
3 changed files with 12 additions and 19 deletions

View File

@ -8,7 +8,7 @@ RUN apt-get update \
debhelper \
devscripts \
reprepro \
&& mkdir /build /reprepro
sudo
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -20,7 +20,11 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
nodejs
VOLUME ["/build", "/reprepro"]
WORKDIR /build
RUN groupadd -g 1000 jenkins \
&& useradd -d /var/jenkins_home -u 1000 -g 1000 -m -s /bin/bash jenkins \
&& echo "jenkins ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/jenkins \
&& mkdir /reprepro
COPY vn-debuild vn-include /usr/bin/
VOLUME ["/reprepro"]
COPY vn-includedeb /usr/bin/

View File

@ -1,12 +0,0 @@
#!/bin/bash
set -e
srcDir=$1
if [ ! -f "$srcDir/debian/changelog" ]; then
echo "Invalid source directory."
exit 1
fi
echo "Building Debian packages."
(cd "$srcDir" && debuild -uc -us -b)

View File

@ -1,14 +1,14 @@
#!/bin/bash
set -e
srcDir=$1
srcDir=.
if [ ! -f "$srcDir/debian/changelog" ]; then
echo "Invalid source directory."
exit 1
fi
codename=$2
codename=$1
buildDir="$srcDir/.."
if [ -z "$codename" ]; then
@ -22,7 +22,8 @@ while read debFile; do
fi
echo "Adding $debFile"
reprepro -b "/reprepro" includedeb $codename "$buildDir/$debFile"
cp "$buildDir/$debFile" /tmp
sudo -u www-data reprepro -b "/reprepro" includedeb $codename "/tmp/$debFile"
done
echo "Cleaning."