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 \ debhelper \
devscripts \ devscripts \
reprepro \ reprepro \
&& mkdir /build /reprepro sudo
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
@ -20,7 +20,11 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
nodejs nodejs
VOLUME ["/build", "/reprepro"] RUN groupadd -g 1000 jenkins \
WORKDIR /build && 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 #!/bin/bash
set -e set -e
srcDir=$1 srcDir=.
if [ ! -f "$srcDir/debian/changelog" ]; then if [ ! -f "$srcDir/debian/changelog" ]; then
echo "Invalid source directory." echo "Invalid source directory."
exit 1 exit 1
fi fi
codename=$2 codename=$1
buildDir="$srcDir/.." buildDir="$srcDir/.."
if [ -z "$codename" ]; then if [ -z "$codename" ]; then
@ -22,7 +22,8 @@ while read debFile; do
fi fi
echo "Adding $debFile" 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 done
echo "Cleaning." echo "Cleaning."