mika / jenkins-debian-glue

Scripts for Debian package/repository handling inside Jenkins
MIT License
131 stars 91 forks source link

Multiple Git repos into source/ with subdir #198

Open linuxmail opened 6 years ago

linuxmail commented 6 years ago

Hi,

I have a project, which inherits five other Git repos, which is checked out to source/ . I have now idea to get it working with the latest JDG.

For Example:

How I have to configure the plugin, to get "/usr/bin/generate-git-snapshot" working ?

[...]
+ '[' -n '' ']'
+ for gbp_conf_file in '"${gbp_conf_files[@]}"'
+ '[' -f /var/lib/jenkins/.gbp.conf ']'
+ for gbp_conf_file in '"${gbp_conf_files[@]}"'
+ '[' -f .gbp.conf ']'
+ for gbp_conf_file in '"${gbp_conf_files[@]}"'
+ '[' -f debian/gbp.conf ']'
+ for gbp_conf_file in '"${gbp_conf_files[@]}"'
+ '[' -f .git/gbp.conf ']'
+ create_local_branch upstream
+ '[' -n upstream ']'
+ local BRANCH=upstream
+ git branch -a
+ grep -q 'remotes/origin/upstream$'
fatal: Not a git repository (or any parent up to mount point /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ echo 'NOTE: branch upstream does not exist, ignoring request to checkout therefore.'
NOTE: branch upstream does not exist, ignoring request to checkout therefore.
+ create_local_branch debian
+ '[' -n debian ']'
+ local BRANCH=debian
+ git branch -a
+ grep -q 'remotes/origin/debian$'
fatal: Not a git repository (or any parent up to mount point /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ echo 'NOTE: branch debian does not exist, ignoring request to checkout therefore.'
NOTE: branch debian does not exist, ignoring request to checkout therefore.
+ '[' false = true ']'
+ branch_checkout
+ random_branch=jenkins-debian-glue-buildbranch3484
+ '[' '' = true ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ echo 'Making sure that random_branch jenkins-debian-glue-buildbranch3484 does not exist'
Making sure that random_branch jenkins-debian-glue-buildbranch3484 does not exist
+ git branch -D jenkins-debian-glue-buildbranch3484
fatal: Not a git repository (or any parent up to mount point /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ true
+ echo 'Checking out branch jenkins-debian-glue-buildbranch3484 based on commit bfe297aba90c3f557458587b3832bed7d9d4a33c'
Checking out branch jenkins-debian-glue-buildbranch3484 based on commit bfe297aba90c3f557458587b3832bed7d9d4a33c
+ git checkout -b jenkins-debian-glue-buildbranch3484 bfe297aba90c3f557458587b3832bed7d9d4a33c
fatal: Not a git repository (or any parent up to mount point /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
[...]
vchrizz commented 6 years ago

i had the same too with olsr project, main source lying on github, debian catalog with older upstream source lying on salsa.debian.org - wanted to use them both to build the package but while studying google how this is acomplished, i learned that this is bad practice, so its better to get everything together in one git repository which then is used for building. so i forked the salsa.debian.org repo, pushed upstream changes to it, added new version tag, now building from my forked repo.