[Qa-jenkins-scm] [jenkins.debian.net] 02/11: lvc: hack to allow use of local images (FIXME for pb10)

Holger Levsen holger at layer-acht.org
Thu Jun 16 20:33:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 2f788e3a92f4a36bf0a0114ea9ac80887dc541dd
Author: Philip Hands <phil at hands.com>
Date:   Mon Jun 13 21:14:38 2016 +0200

    lvc: hack to allow use of local images (FIXME for pb10)
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/lvc.sh       | 7 ++++++-
 job-cfg/lvc.yaml | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bin/lvc.sh b/bin/lvc.sh
index 526d7e9..88dc3cc 100755
--- a/bin/lvc.sh
+++ b/bin/lvc.sh
@@ -24,6 +24,11 @@ cleanup_all() {
 fetch_if_newer() {
         url="$2"
         file="$1"
+	if [ -f $url ] ; then
+		echo "the URL turns out to be a local path ($url) -- linking"
+		ln -sf $url $file
+		return
+        fi
         echo "Downloading $url"
         curlopts="-L -s -S"
         if [ -f "$file" ] ; then
@@ -91,7 +96,7 @@ elif [ ! -z "$IMAGE" ] ; then
         #
         fetch_if_newer "$IMAGE" "$URL"
         # is this really an .iso?
-        if [ $(file "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then
+        if [ $(file -L "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then
                 # yes, so let's md5sum and mount it
                 md5sum $IMAGE
 #                sudo mkdir -p $IMAGE_MNT
diff --git a/job-cfg/lvc.yaml b/job-cfg/lvc.yaml
index dab5eb7..11077d4 100644
--- a/job-cfg/lvc.yaml
+++ b/job-cfg/lvc.yaml
@@ -69,6 +69,9 @@
                     dist_name: 'Debian-Installer Testing (Daily)'
                     my_iso: 'http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/debian-testing-amd64-netinst.iso'
                     my_time: 'H */8 * * *'
+                - 'debian-miniiso':
+                    dist_name: 'Debian-Installer local mini.iso'
+                    my_iso: '/srv/d-i/isos/mini.iso'
                 - 'debian-testing-daily-broken': 
                     dist_name: 'Debian-Installer Testing (Daily) -- Broken Scenarios'
                     my_iso: 'http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/debian-testing-amd64-netinst.iso'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list