I wanted to build Debian packages from the repository URL git://anonscm.debian.org/pkg-e/libs/eio.git. I am already building packages from svn repositories successfully, but this was my first try in building a package from a git repository.
I don´t know if I did not configure my job correct or this is an error in generate-git-snapshot. The source-job fails with the following error message:
...
+ git-buildpackage -nc --git-force-create --git-ignore-new -S -us -uc --git-verbose --git-builder=/bin/true --git-cleaner=/bin/true
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: /bin/true [] []
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/jenkins-debian-glue-buildbranch24042']
gbp:debug: ['git', 'show-ref', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'ls-tree', 'HEAD']
gbp:info: eio_1.7.4.orig.tar.gz does not exist, creating from 'HEAD'
gbp:debug: Building upstream tarball with compression 'gzip -9'
gbp:debug: /bin/true ['-nc', '-S', '-us', '-uc'] []
+ cd ..
+ dpkg-source -I -b source
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building eio using existing ./eio_1.7.4.orig.tar.gz
dpkg-source: info: building eio in eio_1.7.4-1+0~1362644875.13+experimental~1.gbp68038d.debian.tar.gz
dpkg-source: info: building eio in eio_1.7.4-1+0~1362644875.13+experimental~1.gbp68038d.dsc
++ readlink -f debian/changelog
+ git checkout -- /var/lib/jenkins/jobs/eio-source/workspace/source/debian/changelog
+ git checkout HEAD
+ git branch -D jenkins-debian-glue-buildbranch24042
error: Cannot delete the branch 'jenkins-debian-glue-buildbranch24042' which you are currently on.
Build step 'Execute shell' marked build as failure
Archiving artifacts
Recording fingerprints
Recording test results
Finished: FAILURE
After looking in the generate-git-snapshot script I figured out that the last command 'git branch -D "$random_branch' caused the error. All other 'git branch' commands in the script do have a '|| true' behind them which prevents the job to fail if the command fails.
If I put a '|| true' behind the last 'git branch -D "$random_branch' the job succeeds and the packages get build.