author Gregory Szorc <gps@mozilla.com>
Thu, 21 Jul 2016 11:44:55 -0700
changeset 306510 8b43386ca744eae3cef985bdfa2209d24cddce09
parent 306506 846f7e94c1ff6b5d8cbe349d5f188f9dcaa45d01
child 307537 ed95bb78b383b92d422d83ff0b26a2aaf087c5d8
permissions -rw-r--r--
Bug 1247168 - Introduce scripts for running action and decision tasks; r=dustin When we switch to use robustcheckout for version control foo, we'll also be taking the opportunity to have the decision and action tasks execute as the "worker" user. Since caches are mounted and owned by root and since tasks initially run as root, this makes defining the container command in YAML a bit difficult because we have to do some work as root then switch users and continue executing. Rather than shoehorning all that complicated logic into YAML, we introduce bash scripts that do it. These will be plugged into the task YAML when we formally switch the tasks to use the new Docker image. We provide one script for running Gecko decision tasks. We provide another for running action tasks. These are the two consumers of the decision image we care about. We also sneak in a change to add the executable bit to checkout-gecko. MozReview-Commit-ID: CXlyHZJSHcP

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

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

ADD bin /home/worker/bin

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"]