This creates two images:
* ubuntu-build is a basic Ubuntu Trusty image with the build prerequisites
installed via MozBootstrap (plus some additional requirements). It also
contains the worker user and basic directory structure expected by
Mozharness.
* desktop-build is a refinement of ubuntu-build with specifics for building
Firefox Desktop (and, as it turns out, Firefox for Android). It sports a
`bin/build.sh` which acts as a fairly generic mozharness-runner that first
checks out the desired source code revisions, then invokes Mozharness. It
supports:
* caches -- tooltool, workspace, tc-vcs
* starting and stopping Xvfb if necessary (desktop tests require this)
* specifying mozharness build variant, branch, and build pool
* supplying a RelengAPI token
* copying uploads to the artifacts directory
32 lines
1.1 KiB
Bash
32 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -ve
|
|
|
|
test `whoami` == 'root';
|
|
|
|
# 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
|
|
|
|
# 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
|