Merge "Allow use of mirrors when building Ubuntu images"

This commit is contained in:
Jenkins 2014-01-20 11:35:31 +00:00 committed by Gerrit Code Review
commit 1831a2bfbd
2 changed files with 12 additions and 0 deletions

View File

@ -6,3 +6,5 @@ Overrides:
use the environment variable DIB\_CLOUD\_IMAGES
* To download a non-default release of Ubuntu cloud images, use the
environment variable DIB\_RELEASE
* To use a different mirror rather than archive.ubuntu.com, use the
environment variable DIB\_DISTRIBUTION\_MIRROR

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -eu
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
sudo sed -ie "s&http://archive.ubuntu.com/ubuntu&$DIB_DISTRIBUTION_MIRROR&" \
/etc/apt/sources.list