Allow specific ubuntu distro to be chosen when calling script
There are some issues with the latest ubuntu 16.04 and the v1.0 stable
release. We could have similar issues going forward so best to give
ourselves the flexibility to choose our release.
The default will still be :latest
Change-Id: Ifa33ce4ee1c51a5d80a5892d6ed1f1e4097734d2
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/build-setup.sh b/build-setup.sh
index 745fe68..7930992 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -4,7 +4,7 @@
#
# It expects a few variables which are part of Jenkins build job matrix:
# target = barreleye|palmetto|qemu
-# distro = fedora|ubuntu
+# distro = fedora|ubuntu|ubuntu:14.04|ubuntu:16.04
# obmcdir = <name of openbmc src dir> (default openbmc)
# WORKSPACE = <location of base openbmc/openbmc repo>
@@ -35,6 +35,11 @@
git clone https://github.com/openbmc/openbmc ${WORKSPACE}/${obmcdir}
fi
+# if user just passed in ubuntu then use latest
+if [[ $distro == "ubuntu" ]]; then
+ distro="ubuntu:latest"
+fi
+
# Work out what build target we should be running and set bitbake command
case ${target} in
barreleye)
@@ -107,13 +112,13 @@
EOF
)
-elif [[ "${distro}" == ubuntu ]]; then
+elif [[ "${distro}" == "ubuntu"* ]]; then
if [[ -n "${http_proxy}" ]]; then
PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
fi
Dockerfile=$(cat << EOF
-FROM ${DOCKER_BASE}ubuntu:latest
+FROM ${DOCKER_BASE}${distro}
${PROXY}