From 2f3d031392b03cee97a0b8658eae6293ade8cc4a Mon Sep 17 00:00:00 2001 From: Wander Lairson Costa Date: Mon, 21 Aug 2017 08:50:08 -0300 Subject: [PATCH] Bug 1391806: Move valgrind task to its own docker image. r=ted bug 1382280 tripled the size of desktop-build image because of installation of debug symbols. It is only used for valgrind, so let's move valgrind task to use its own image. MozReview-Commit-ID: 16St7dDj8tr --HG-- rename : taskcluster/docker/desktop-build/Dockerfile => taskcluster/docker/valgrind-build/Dockerfile extra : rebase_source : cc66813cab430d906643fbadf63c661e14784f6f --- taskcluster/ci/docker-image/kind.yml | 2 + taskcluster/ci/valgrind/kind.yml | 2 +- taskcluster/docker/desktop-build/Dockerfile | 3 - .../recipes/centos6-build-system-setup.sh | 5 +- taskcluster/docker/valgrind-build/Dockerfile | 83 +++++++++++++++++++ 5 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 taskcluster/docker/valgrind-build/Dockerfile diff --git a/taskcluster/ci/docker-image/kind.yml b/taskcluster/ci/docker-image/kind.yml index 97019b87d3c8..3a8c543283d4 100644 --- a/taskcluster/ci/docker-image/kind.yml +++ b/taskcluster/ci/docker-image/kind.yml @@ -18,6 +18,8 @@ jobs: symbol: I(dt16t) desktop-build: symbol: I(db) + valgrind-build: + symbol: I(vb) lint: symbol: I(lnt) android-gradle-build: diff --git a/taskcluster/ci/valgrind/kind.yml b/taskcluster/ci/valgrind/kind.yml index cd37eb5c1871..78cda1d3da45 100644 --- a/taskcluster/ci/valgrind/kind.yml +++ b/taskcluster/ci/valgrind/kind.yml @@ -26,7 +26,7 @@ jobs: tier: 1 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: valgrind-build} max-run-time: 72000 env: TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest" diff --git a/taskcluster/docker/desktop-build/Dockerfile b/taskcluster/docker/desktop-build/Dockerfile index 02c9121d4c2a..3054dbbcd829 100644 --- a/taskcluster/docker/desktop-build/Dockerfile +++ b/taskcluster/docker/desktop-build/Dockerfile @@ -33,9 +33,6 @@ ADD topsrcdir/taskcluster/docker/recipes/install-cmake.sh /setup/install-cmake.s # %include taskcluster/docker/recipes/centos6-build-system-setup.sh ADD topsrcdir/taskcluster/docker/recipes/centos6-build-system-setup.sh /setup/system-setup.sh -# %include taskcluster/docker/recipes/centos-install-debug-symbols.sh -ADD topsrcdir/taskcluster/docker/recipes/centos-install-debug-symbols.sh /setup/install-debug-symbols.sh - # TODO remove once base image doesn't install Mercurial RUN pip uninstall -y Mercurial diff --git a/taskcluster/docker/recipes/centos6-build-system-setup.sh b/taskcluster/docker/recipes/centos6-build-system-setup.sh index d2ea531606d6..b7592cd34879 100644 --- a/taskcluster/docker/recipes/centos6-build-system-setup.sh +++ b/taskcluster/docker/recipes/centos6-build-system-setup.sh @@ -9,6 +9,9 @@ cd /setup . /setup/install-mercurial.sh . /setup/install-make.sh . /setup/install-cmake.sh -. /setup/install-debug-symbols.sh + +if [ -f /setup/install-debug-symbols.sh ]; then + . /setup/install-debug-symbols.sh +fi rm -rf /setup diff --git a/taskcluster/docker/valgrind-build/Dockerfile b/taskcluster/docker/valgrind-build/Dockerfile new file mode 100644 index 000000000000..18b7b7db8a83 --- /dev/null +++ b/taskcluster/docker/valgrind-build/Dockerfile @@ -0,0 +1,83 @@ +# TODO remove VOLUME below when the base image is updated next. +FROM taskcluster/centos6-build-upd:0.1.7.20170801103900 +MAINTAINER Dustin J. Mitchell + +# TODO remove when base image is updated +VOLUME /home/worker/workspace +VOLUME /home/worker/tooltool-cache + +# Add build scripts; these are the entry points from the taskcluster worker, and +# operate on environment variables + +# %include taskcluster/docker/desktop-build/bin +ADD topsrcdir/taskcluster/docker/desktop-build/bin /home/worker/bin + +RUN chmod +x /home/worker/bin/* + +# %include python/mozbuild/mozbuild/action/tooltool.py +ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/tooltool.py +ADD topsrcdir/python/mozbuild/mozbuild/action/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 taskcluster/docker/recipes/common.sh +ADD topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh + +# %include taskcluster/docker/recipes/install-mercurial.sh +ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh + +# %include taskcluster/docker/recipes/install-make.sh +ADD topsrcdir/taskcluster/docker/recipes/install-make.sh /setup/install-make.sh + +# %include taskcluster/docker/recipes/install-cmake.sh +ADD topsrcdir/taskcluster/docker/recipes/install-cmake.sh /setup/install-cmake.sh + +# %include taskcluster/docker/recipes/centos6-build-system-setup.sh +ADD topsrcdir/taskcluster/docker/recipes/centos6-build-system-setup.sh /setup/system-setup.sh + +# %include taskcluster/docker/recipes/centos-install-debug-symbols.sh +ADD topsrcdir/taskcluster/docker/recipes/centos-install-debug-symbols.sh /setup/install-debug-symbols.sh + +# TODO remove once base image doesn't install Mercurial +RUN pip uninstall -y Mercurial + +RUN bash /setup/system-setup.sh + +# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb +# %include taskcluster/docker/recipes/xvfb.sh +ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh + +# %include taskcluster/docker/recipes/run-task +ADD topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task + +# Add configuration +# %include taskcluster/docker/desktop-build/dot-config +ADD topsrcdir/taskcluster/docker/desktop-build/dot-config /home/worker/.config + +# Generate machine uuid file +RUN dbus-uuidgen --ensure=/var/lib/dbus/machine-id + +# Stubbed out credentials; mozharness looks for this file an issues a WARNING +# if it's not found, which causes the build to fail. Note that this needs to +# be in the parent of the workspace directory and in the directory where +# mozharness is run (not its --work-dir). See Bug 1169652. +# %include taskcluster/docker/desktop-build/oauth.txt +ADD topsrcdir/taskcluster/docker/desktop-build/oauth.txt /home/worker/ + +# stubbed out buildprops, which keeps mozharness from choking +# Note that this needs to be in the parent of the workspace directory and in +# the directory where mozharness is run (not its --work-dir) +# %include taskcluster/docker/desktop-build/buildprops.json +ADD topsrcdir/taskcluster/docker/desktop-build/buildprops.json /home/worker/ + +# Move installation to base centos6-build image once Bug 1272629 is fixed +# Install the screen package here to use with xvfb. +# Install bison to build binutils. +RUN yum install -y bison screen + +# Install libtool. +RUN yum install -y libtool + +# Set a default command useful for debugging +CMD ["/bin/bash", "--login"]