summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-07-22 12:16:26 +0100
committerLars Wirzenius <liw@liw.fi>2013-07-22 12:16:26 +0100
commitc6327fe13fdde19156f5ca6aff8727ce2c760dce (patch)
tree433b63a518f1b81704bc70260c1d532f4b37314a
parent4006673b79c876e6b13c0b3630351b6c8278a418 (diff)
downloadjenkinstool-c6327fe13fdde19156f5ca6aff8727ce2c760dce.tar.gz
Stupid jenkins
-rwxr-xr-xjenkinstool29
-rw-r--r--simplejenkinsapi/jobconfig.py2
2 files changed, 28 insertions, 3 deletions
diff --git a/jenkinstool b/jenkinstool
index ea70d2b..b2fa6de 100755
--- a/jenkinstool
+++ b/jenkinstool
@@ -108,7 +108,8 @@ is_release()
fi
elif [ -d .git ]
then
- case $(git name-rev --tags --name-only HEAD) in
+ local output="$(git name-rev --tags --name-only HEAD)"
+ case "$output" in
"${project}-${version}^0") return 0 ;; # annotated tag
"${project}-${version}") return 0 ;; # plain tag
*) return 1 ;;
@@ -171,6 +172,7 @@ then
exit 1
;;
esac
+
basetgz="$pbuilder_release_tgz"
debian_dist="%(host.debian-dist)s"
if [ "$debian_dist" != unstable ]
@@ -189,12 +191,14 @@ then
lib*) subdir=$(echo "$sourcepkg" | cut -c1-4) ;;
*) subdir=$(echo "$sourcepkg" | cut -c1) ;;
esac
- poolurl="%(global.artifacts-url)s/debian/pool/main/$subdir/$sourcepkg"
+ poolpath="pool/main/$subdir/$sourcepkg"
+ poolurl="%(global.artifacts-url)s/debian/$poolpath"
origtgz="${sourcepkg}_${version}.orig.tar.gz"
changes="${sourcepkg}_${debianversion}_source.changes"
dsc="${sourcepkg}_$debianversion.dsc"
dsc_url="$poolurl/$dsc"
+ debian_dsc_url="http://cdn.debian.net/debian/$poolpath/$dsc"
archany_changes="${sourcepkg}_${debianversion}_%(host.arch)s.changes"
archall_changes="${sourcepkg}_${debianversion}_all.changes"
fi
@@ -565,6 +569,11 @@ then
echo "$dsc_url already exists, not rebuilding"
exit 0
fi
+if url_exists "$debian_dsc_url"
+then
+ echo "$debian_dsc_url already exists, not rebuilding"
+ exit 0
+fi
wget -O "../$origtgz" "$project_url/$tarball"
@@ -647,6 +656,14 @@ then
echo "$poolurl/$archall_changes exists, not rebuilding"
exit 0
fi
+# We can just check for .dsc on Debian mirrors: if the source package
+# exists, the .deb will also exist. This saves us from having to
+# figure out the binary package names.
+if url_exists "$debian_dsc_url"
+then
+ echo "$debian_dsc_url exists, not rebuilding"
+ exit 0
+fi
binopt=-b
'''
else:
@@ -661,6 +678,14 @@ then
echo "$poolurl/$archany_changes exists, not rebuilding"
exit 0
fi
+# We can just check for .dsc on Debian mirrors: if the source package
+# exists, the .deb will also exist. This saves us from having to
+# figure out the binary package names.
+if url_exists "$debian_dsc_url"
+then
+ echo "$debian_dsc_url exists, not rebuilding"
+ exit 0
+fi
binopt=-B
'''
diff --git a/simplejenkinsapi/jobconfig.py b/simplejenkinsapi/jobconfig.py
index 0e7a38d..58a42a9 100644
--- a/simplejenkinsapi/jobconfig.py
+++ b/simplejenkinsapi/jobconfig.py
@@ -160,7 +160,7 @@ cd "%(host.directory)s"
ET.SubElement(scm, 'excludedUsers').text = ''
ET.SubElement(scm, 'gitConfigName').text = ''
ET.SubElement(scm, 'gitConfigEmail').text = ''
- ET.SubElement(scm, 'skipTag').text = 'false'
+ ET.SubElement(scm, 'skipTag').text = 'true'
ET.SubElement(scm, 'includedRegions').text = ''
ET.SubElement(scm, 'scmName').text = ''