2016-08-09 19:38:12 +03:00
|
|
|
FROM ubuntu:16.04
|
2016-07-25 17:44:37 +03:00
|
|
|
MAINTAINER Joel Maher <joel.maher@gmail.com>
|
|
|
|
|
2017-08-28 14:44:51 +03:00
|
|
|
RUN mkdir /builds
|
|
|
|
RUN useradd -d /builds/worker -s /bin/bash -m worker
|
|
|
|
WORKDIR /builds/worker
|
2016-08-09 19:38:12 +03:00
|
|
|
|
2017-08-23 18:57:59 +03:00
|
|
|
# We need to declare all potentially cache volumes as caches. Also,
|
|
|
|
# making high I/O paths volumes increase I/O throughput because of
|
|
|
|
# AUFS slowness.
|
2017-08-28 14:44:51 +03:00
|
|
|
VOLUME /builds/worker/.cache
|
|
|
|
VOLUME /builds/worker/checkouts
|
|
|
|
VOLUME /builds/worker/tooltool-cache
|
|
|
|
VOLUME /builds/worker/workspace
|
2017-08-23 18:57:59 +03:00
|
|
|
|
2017-02-22 11:20:41 +03:00
|
|
|
# %include python/mozbuild/mozbuild/action/tooltool.py
|
|
|
|
ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
|
2016-08-09 19:38:12 +03:00
|
|
|
|
2016-09-28 06:05:54 +03:00
|
|
|
# %include testing/mozharness/external_tools/robustcheckout.py
|
|
|
|
ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
|
|
|
|
|
2016-10-20 15:55:34 +03:00
|
|
|
# %include taskcluster/docker/recipes/common.sh
|
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh
|
2016-09-29 07:45:25 +03:00
|
|
|
|
2016-10-20 15:55:34 +03:00
|
|
|
# %include taskcluster/docker/recipes/install-mercurial.sh
|
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
|
2016-08-09 19:38:12 +03:00
|
|
|
|
2017-01-20 13:57:47 +03:00
|
|
|
# %include taskcluster/docker/recipes/install-node.sh
|
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/install-node.sh /setup/install-node.sh
|
|
|
|
|
2016-09-30 20:17:20 +03:00
|
|
|
# Add the tooltool manifest containing the minidump_stackwalk binary.
|
|
|
|
# %include testing/config/tooltool-manifests/linux64/releng.manifest
|
|
|
|
ADD topsrcdir/testing/config/tooltool-manifests/linux64/releng.manifest /tmp/minidump_stackwalk.manifest
|
|
|
|
|
2016-10-20 15:55:34 +03:00
|
|
|
# %include taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh
|
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh /setup/system-setup.sh
|
2016-08-09 19:38:12 +03:00
|
|
|
RUN bash /setup/system-setup.sh
|
|
|
|
|
2016-07-06 17:06:58 +03:00
|
|
|
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
|
2016-10-20 15:55:34 +03:00
|
|
|
# %include taskcluster/docker/recipes/xvfb.sh
|
2017-08-28 14:44:51 +03:00
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /builds/worker/scripts/xvfb.sh
|
2016-07-06 17:06:58 +03:00
|
|
|
|
2016-10-20 15:55:34 +03:00
|
|
|
# %include taskcluster/docker/recipes/run-task
|
2017-08-28 14:44:51 +03:00
|
|
|
ADD topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
|
2016-08-09 19:38:12 +03:00
|
|
|
|
2017-04-27 00:36:45 +03:00
|
|
|
# %include taskcluster/scripts/tester/test-linux.sh
|
2017-08-28 14:44:51 +03:00
|
|
|
ADD topsrcdir/taskcluster/scripts/tester/test-linux.sh /builds/worker/bin/test-linux.sh
|
2016-08-09 23:12:14 +03:00
|
|
|
|
2016-08-09 19:38:12 +03:00
|
|
|
# Set variable normally configured at login, by the shells parent process, these
|
|
|
|
# are taken from GNU su manual
|
2017-08-28 14:44:51 +03:00
|
|
|
ENV HOME /builds/worker
|
2016-08-09 19:38:12 +03:00
|
|
|
ENV SHELL /bin/bash
|
|
|
|
ENV USER worker
|
|
|
|
ENV LOGNAME worker
|
|
|
|
ENV HOSTNAME taskcluster-worker
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2016-07-25 17:44:37 +03:00
|
|
|
# Add utilities and configuration
|
2017-08-28 14:44:51 +03:00
|
|
|
COPY dot-files/config /builds/worker/.config
|
|
|
|
COPY dot-files/pulse /builds/worker/.pulse
|
2016-07-25 17:44:37 +03:00
|
|
|
RUN chmod +x bin/*
|
|
|
|
# TODO: remove this when buildbot is gone
|
2017-08-28 14:44:51 +03:00
|
|
|
COPY buildprops.json /builds/worker/buildprops.json
|
2016-07-25 17:44:37 +03:00
|
|
|
COPY tc-vcs-config.yml /etc/taskcluster-vcs.yml
|
|
|
|
|
|
|
|
# TODO: remove
|
2017-08-28 14:44:51 +03:00
|
|
|
ADD https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step /builds/worker/bin/buildbot_step
|
|
|
|
RUN chmod u+x /builds/worker/bin/buildbot_step
|
2016-07-25 17:44:37 +03:00
|
|
|
|
|
|
|
# allow the worker user to access video devices
|
|
|
|
RUN usermod -a -G video worker
|
|
|
|
|
|
|
|
RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts
|
|
|
|
|
2016-11-13 15:56:52 +03:00
|
|
|
# install tc-vcs and tc-npm-cache
|
|
|
|
RUN npm install -g taskcluster-vcs@2.3.12 \
|
2016-07-25 17:44:37 +03:00
|
|
|
&& npm install -g taskcluster-npm-cache@1.1.14 \
|
|
|
|
&& rm -rf ~/.npm
|
2017-08-28 14:44:51 +03:00
|
|
|
ENV PATH $PATH:/builds/worker/bin
|
2016-07-25 17:44:37 +03:00
|
|
|
|
|
|
|
# TODO Re-enable worker when bug 1093833 lands
|
|
|
|
#USER worker
|
|
|
|
|
|
|
|
# Disable Ubuntu update prompt
|
|
|
|
# http://askubuntu.com/questions/515161/ubuntu-12-04-disable-release-notification-of-14-04-in-update-manager
|
|
|
|
ADD release-upgrades /etc/update-manager/release-upgrades
|
|
|
|
|
|
|
|
# Disable tools with on-login popups that interfere with tests; see bug 1240084 and bug 984944.
|
2017-03-07 17:42:52 +03:00
|
|
|
ADD autostart/jockey-gtk.desktop autostart/deja-dup-monitor.desktop /etc/xdg/autostart/
|
|
|
|
|
|
|
|
# Bug 1345105 - Do not run periodical update checks and downloads
|
|
|
|
ADD autostart/gnome-software-service.desktop /etc/xdg/autostart/
|
2016-07-25 17:44:37 +03:00
|
|
|
|
|
|
|
# In test.sh we accept START_VNC to start a vnc daemon.
|
|
|
|
# Exposing this port allows it to work.
|
|
|
|
EXPOSE 5900
|
|
|
|
|
|
|
|
# This helps not forgetting setting DISPLAY=:0 when running
|
|
|
|
# tests outside of test.sh
|
|
|
|
ENV DISPLAY :0
|
|
|
|
|
|
|
|
# Disable apport (Ubuntu app crash reporter) to avoid stealing focus from test runs
|
|
|
|
ADD apport /etc/default/apport
|
|
|
|
|
|
|
|
# Disable font antialiasing for now to match releng's setup
|
2017-08-28 14:44:51 +03:00
|
|
|
ADD fonts.conf /builds/worker/.fonts.conf
|
2016-07-25 17:44:37 +03:00
|
|
|
|
|
|
|
# Set up first-run experience for interactive mode
|
|
|
|
ADD motd /etc/taskcluster-motd
|
|
|
|
ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
|
|
|
|
RUN chmod +x /bin/taskcluster-interactive-shell
|
|
|
|
|
2017-08-28 14:44:51 +03:00
|
|
|
RUN chown -R worker:worker /builds/worker
|
2016-08-10 02:15:22 +03:00
|
|
|
|
2016-07-25 17:44:37 +03:00
|
|
|
# Set a default command useful for debugging
|
|
|
|
CMD ["/bin/bash", "--login"]
|