testing/docker/decision/Dockerfile
author Gregory Szorc <gps@mozilla.com>
Fri, 29 Jul 2016 21:03:48 -0700
changeset 307556 b18ad418cba80522c888d329ae4eb37ab07fb436
parent 307537 ed95bb78b383b92d422d83ff0b26a2aaf087c5d8
child 315568 85980619dd33d75c8db4844b29564687257f8f31
permissions -rw-r--r--
Bug 1290620 - Use run-task from decision task; r=dustin This commit does a lot. But it's really not too difficult to comprehend once you focus on the final state, which is basically the same as the "lint" image and derived tasks. Before, the "decision" image contained a "checkout-gecko" script and "run-action" and "run-decision" scripts. The latter 2 invoked the first script. The "run-task" script basically does what the combination of these scripts were doing before. So we switch to it. While we're here, we also replaced the custom Mercurial installation in this image with the shared install-mercurial.sh script. The system-setup.sh script for the decision image is now short and sweet. The YAML files for tasks using this image have been updated to use "run-task." We no longer have to pass an environment variable to hold command arguments. So we revert to putting these arguments inline in the task's command. Dustin never liked passing the arguments as environment variables, so it should make him happy ;) We add --log-no-times because "run-task" prefixes its own timestamps on output lines. The path to the Gecko checkout has been changed from /home/worker/workspace to /home/worker/checkouts to match changes made in bug 1289643. Finally, since "checkout-gecko-and-run" is no longer used, we delete it. The Docker image version has been bumped accordingly. MozReview-Commit-ID: HAGuCz6668Q

FROM          ubuntu:16.04
MAINTAINER    Greg Arndt <garndt@mozilla.com>

# Add worker user
RUN useradd -d /home/worker -s /bin/bash -m worker
RUN mkdir /home/worker/artifacts && chown worker:worker /home/worker/artifacts

# %include testing/docker/recipes/tooltool.py
ADD topsrcdir/testing/docker/recipes/tooltool.py /tmp/tooltool.py

# %include testing/docker/recipes/install-mercurial.sh
ADD topsrcdir/testing/docker/recipes/install-mercurial.sh /tmp/install-mercurial.sh

ADD system-setup.sh /tmp/system-setup.sh
RUN bash /tmp/system-setup.sh

# %include testing/docker/recipes/run-task
ADD topsrcdir/testing/docker/recipes/run-task /home/worker/bin/run-task

ENV PATH /home/worker/bin:$PATH
ENV SHELL /bin/bash
ENV HOME /home/worker

# Set a default command useful for debugging
CMD ["/bin/bash", "--login"]