Skip to content

Commit

Permalink
Squashed 'tools/' changes from f7f1370..fb5985b
Browse files Browse the repository at this point in the history
fb5985b Merge pull request #14 from weaveworks/increase-image-timeout
b42e792 Merge pull request #13 from weaveworks/move-gce-scripts
c5800d0 Increase rebuild-image image lifetime to 3 days.

git-subtree-dir: tools
git-subtree-split: fb5985b
  • Loading branch information
tomwilkie committed Jan 13, 2016
1 parent 98bca0b commit 795436e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rebuild-image
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ if has_changes $cached_revision $CIRCLE_SHA1 ; then
exit 0
fi

if [ "$(commit_timestamp $cached_revision)" -lt "$(( $(date +%s) - 86400 ))" ]; then
IMAGE_TIMEOUT="$(( 3 * 24 * 60 * 60 ))"
if [ "$(commit_timestamp $cached_revision)" -lt "${IMAGE_TIMEOUT}" ]; then
echo ">>> Image is more the 24hrs old; rebuilding"
rebuild
exit 0
Expand Down

0 comments on commit 795436e

Please sign in to comment.