Bug 1289249 - Extract tooltool_fetch to its own shell script; r?dustin
I will add more stuff to common.sh in the future in order to justify
its existence. Not in this bug though.
MozReview-Commit-ID: Lx7MJwBMH0w
--- a/testing/docker/desktop1604-test/Dockerfile
+++ b/testing/docker/desktop1604-test/Dockerfile
@@ -5,16 +5,19 @@ RUN useradd -d /home/worker -s /bin/bash
WORKDIR /home/worker
# %include testing/docker/recipes/tooltool.py
ADD topsrcdir/testing/docker/recipes/tooltool.py /setup/tooltool.py
# %include testing/mozharness/external_tools/robustcheckout.py
ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
+# %include testing/docker/recipes/common.sh
+ADD topsrcdir/testing/docker/recipes/common.sh /setup/common.sh
+
# %include testing/docker/recipes/install-mercurial.sh
ADD topsrcdir/testing/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
# %include testing/docker/recipes/ubuntu1604-test-system-setup.sh
ADD topsrcdir/testing/docker/recipes/ubuntu1604-test-system-setup.sh /setup/system-setup.sh
RUN bash /setup/system-setup.sh
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
new file mode 100644
--- /dev/null
+++ b/testing/docker/recipes/common.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+tooltool_fetch() {
+ cat >manifest.tt
+ python /setup/tooltool.py fetch
+ rm manifest.tt
+}
--- a/testing/docker/recipes/ubuntu1604-test-system-setup.sh
+++ b/testing/docker/recipes/ubuntu1604-test-system-setup.sh
@@ -85,23 +85,17 @@ apt_packages+=('python-pip')
apt-get update
# This allows ubuntu-desktop to be installed without human interaction
export DEBIAN_FRONTEND=noninteractive
apt-get install -y -f ${apt_packages[@]}
dpkg-reconfigure locales
-# set up tooltool (temporarily)
-tooltool_fetch() {
- cat >manifest.tt
- python /setup/tooltool.py fetch
- rm manifest.tt
-}
-
+. /setup/common.sh
. /setup/install-mercurial.sh
pip install --upgrade pip
pip install virtualenv
# Install node
tooltool_fetch <<'EOF'