diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-08-19 11:35:08 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-08-19 11:35:08 +0100 |
commit | ea52801b59b6b4cd15ad7750b3fac6f0044fb42d (patch) | |
tree | c97139546e14b738a4dfadda6feb4547e1607f48 | |
parent | 109e2d008c6f4b3d61412b21f977d4796875c834 (diff) | |
download | jenkinstool-ea52801b59b6b4cd15ad7750b3fac6f0044fb42d.tar.gz |
Skip deb building if the debs already exist
-rwxr-xr-x | jenkinstool | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/jenkinstool b/jenkinstool index 3f36fc2..cd41bda 100755 --- a/jenkinstool +++ b/jenkinstool @@ -83,6 +83,8 @@ then changes="${sourcepkg}_${debianversion}_source.changes" dsc="${sourcepkg}_$debianversion.dsc" dsc_url="$poolurl/$dsc" + archany_changes="${sourcepkg}_${version}-1_%(host.arch)s.changes" + archall_changes="${sourcepkg}_${version}-1_all.changes" fi ''' @@ -321,6 +323,7 @@ then mkdir -p "$artifacts" mv "$tarball" "$artifacts/." else + echo "$artifacts/$tarball already exists, ignoring rebuilt version" rm "$tarball" fi ''') @@ -336,8 +339,11 @@ fi self.add_rsync_workspace_to_target(jc) jc.add_ssh_command(prelude + '''\ -if ! url_exists "$dsc_url" +if url_exists "$dsc_url" then + echo "$dsc_url already exists, not rebuilding" + exit 0 +else wget -O "../$origtgz" "$project_url/$tarball" dch -v "$debianversion" --distribution "%(host.debian-dist)s" "CI build" dch -r '' @@ -352,7 +358,7 @@ fi def process_incoming_job(self, config, project, suffix): '''Create job that processing reprepro's incoming queue.''' - host = { 'name': 'localhost' } + host = { 'name': 'localhost', 'arch': 'unimportant' } jc = self.create_job_config(host, project, 'incoming_' + suffix) jc.set_description('Process reprepro incoming queue') jc.add_shell_command(prelude + @@ -371,6 +377,11 @@ fi script = prelude if build_all: script += ''' +if url_exists "$poolurl/$archall_changes" +then + echo "$poolurl/$archall_changes exists, not rebuilding" + exit 0 +fi binopt=-b ''' else: @@ -380,6 +391,11 @@ then echo No architecture specific packages to build, skipping. exit 0 fi +if url_exists "$poolurl/$archany_changes" +then + echo "$poolurl/$archany_changes exists, not rebuilding" + exit 0 +fi binopt=-B ''' |