Browse Source

Support listing Debian package content via new script jdg-debc (Closes #119)

Can be used e.g. via:

  export POST_BUILD_HOOK=/usr/bin/jdg-debc

before the /usr/bin/build-and-provide-package step.

Thanks to Sipwise GmbH for sponsoring this script
keep-around/8fe677820fae2a195e2dccace10b19edde8dc200
Michael Prokop 7 years ago
parent
commit
d0c30f2a84
  1. 1
      debian/jenkins-debian-glue.install
  2. 3
      puppet/jenkins_debian_glue.pp
  3. 24
      scripts/jdg-debc

1
debian/jenkins-debian-glue.install

@ -3,6 +3,7 @@ debian/tmp/usr/bin/generate-git-snapshot usr/bin/
debian/tmp/usr/bin/generate-reprepro-codename usr/bin/
debian/tmp/usr/bin/generate-svn-snapshot usr/bin/
debian/tmp/usr/bin/increase-version-number usr/bin/
debian/tmp/usr/bin/jdg-debc usr/bin/
debian/tmp/usr/bin/remove-reprepro-codename usr/bin/
debian/tmp/usr/bin/repository_checker usr/bin/
debian/tmp/usr/share/jenkins-debian-glue/examples/debian_glue etc/jenkins/

3
puppet/jenkins_debian_glue.pp

@ -422,7 +422,8 @@ class jenkins::config {
</selector>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command>/usr/bin/build-and-provide-package</command>
<command>export POST_BUILD_HOOK=/usr/bin/jdg-debc
/usr/bin/build-and-provide-package</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo &quot;Listing packages inside the jenkins-debian-glue repository:&quot;

24
scripts/jdg-debc

@ -0,0 +1,24 @@
#!/bin/sh
cat <<EOF
┌──────────────────────────────────────────────────────────────────────────────┐
│ Displaying content of generated Debian packages. │
└──────────────────────────────────────────────────────────────────────────────┘
EOF
if ! which debc >/dev/null 2>&1 ; then
echo "Error: debc executable not available, please install the devscripts Debian package." >&2
exit 1
fi
CHANGES=$(find . -maxdepth 1 -name \*.changes ! -name \*_source.changes)
if [ -n "$CHANGES" ] >/dev/null 2>&1 ; then
for file in $CHANGES ; do
debc "$file"
done
elif ls ./*.deb >/dev/null 2>&1 ; then
debc ./*.deb
else
echo "No changes and deb files found in $(pwd), ignoring."
fi
Loading…
Cancel
Save