Bug 1154827 - Add a base ubuntu 32 bit builder; r=dustin
authorMorgan Phillips <winter2718@gmail.com>
Mon, 15 Jun 2015 19:41:25 +0200
changeset 249342 1cb820f427d87b46b34519c17652e84205f369f1
parent 249341 f9c16fa4852ccea8fb87b10626309a055d73c2cd
child 249343 75b4e08092b2ed0be2138d0fc7d4cdaadb2054f9
push id28923
push userryanvm@gmail.com
push dateWed, 17 Jun 2015 18:57:11 +0000
treeherdermozilla-central@099d6cd6725e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1154827
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1154827 - Add a base ubuntu 32 bit builder; r=dustin Based on a ubuntu 14.04 chroot environment, loaded into docker. The tool chain detects a 32 bit environment so things like mach build and mach bootstrap work well; however, some 64 bit libraries are required to successfully build: namely, libz.
testing/docker/ubuntu32-build/Dockerfile
testing/docker/ubuntu32-build/REPOSITORY
testing/docker/ubuntu32-build/VERSION
testing/docker/ubuntu32-build/build-setup.sh
testing/docker/ubuntu32-build/hgrc
testing/docker/ubuntu32-build/system-setup.sh
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/Dockerfile
@@ -0,0 +1,36 @@
+FROM          32bit/ubuntu:14.04
+MAINTAINER    Morgan Reece Phillips <winter2718@gmail.com>
+
+### add worker user and setup its workspace
+RUN useradd -d /home/worker -s /bin/bash -m worker
+
+# install non-build specific dependencies in a single layer
+ADD           system-setup.sh   /tmp/system-setup.sh
+RUN           bash /tmp/system-setup.sh
+
+# configure git and install tc-vcs
+RUN git config --global user.email "nobody@mozilla.com" && \
+    git config --global user.name "mozilla"
+RUN npm install -g taskcluster-vcs@2.3.5 || true
+
+# Ensure that build specific dependencies live in a single layer
+ADD           build-setup.sh   /tmp/build-setup.sh
+RUN           bash /tmp/build-setup.sh
+
+# Builds need the share module enabled
+ADD           hgrc /home/worker/.hgrc
+
+# Set variable normally configured at login, by the shells parent process, these
+# are taken from GNU su manual
+ENV           HOME          /home/worker
+ENV           SHELL         /bin/bash
+ENV           USER          worker
+ENV           LOGNAME       worker
+ENV           HOSTNAME      taskcluster-worker
+
+# Declare default working folder
+RUN chown -R worker:worker /home/worker/* /home/worker/.*
+WORKDIR       /home/worker
+
+# Set a default command useful for debugging
+CMD ["/bin/bash", "--login"]
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/REPOSITORY
@@ -0,0 +1,1 @@
+quay.io/mrrrgn
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/VERSION
@@ -0,0 +1,1 @@
+0.0.1
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/build-setup.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+set -ve
+
+test `whoami` == 'root';
+
+# This is a known workaround for a Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/430224
+dpkg-divert --rename --add /usr/sbin/invoke-rc.d
+ln -s /bin/true /usr/sbin/invoke-rc.d
+
+# run mozbootstrap to install build specific dependencies
+wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
+python bootstrap.py --application-choice=desktop --no-interactive
+
+# Clean up after Ubuntu/Upstart bug workaround
+rm /usr/sbin/invoke-rc.d
+dpkg-divert --rename --remove /usr/sbin/invoke-rc.d
+
+# note that TC will replace workspace with a cache mount; there's no sense
+# creating anything inside there
+mkdir -p /home/worker/workspace
+chown worker:worker /home/worker/workspace
+
+# /builds is *not* replaced with a mount in the docker container. The worker
+# user writes to lots of subdirectories, though, so it's owned by that user
+mkdir -p /builds
+chown worker:worker /builds
+
+# install tooltool directly from github where tooltool_wrapper.sh et al. expect
+# to find it
+wget -O /builds/tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
+chmod +x /builds/tooltool.py
+
+# check out the tools repo; this will be updated as necessary in each container
+# but it changes infrequently so it makes sense to cache in place
+tc-vcs checkout /builds/tools https://hg.mozilla.org/build/tools
+chown -R worker:worker /builds/tools
+
+rm /tmp/build-setup.sh
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/hgrc
@@ -0,0 +1,2 @@
+[extensions]
+share =
new file mode 100644
--- /dev/null
+++ b/testing/docker/ubuntu32-build/system-setup.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+set -ve
+
+test `whoami` == 'root';
+
+apt-get update -y
+apt-get install -y \
+    wget \
+    python g++-multilib \
+    git\
+    nodejs-legacy \
+    npm \
+    curl \
+    x11-utils \
+    python-virtualenv \
+    valgrind \
+    lib64z1-dev
+
+rm /tmp/system-setup.sh