Bug 1459737 - Move run-task into taskcluster/scripts; r?dustin
In preparation for making it usable on Windows, after which point
having it in a directory with "docker" in it doesn't make much sense.
MozReview-Commit-ID: Hgu0buFyJwF
--- a/taskcluster/docker/debian-base/Dockerfile
+++ b/taskcluster/docker/debian-base/Dockerfile
@@ -62,12 +62,12 @@ COPY topsrcdir/testing/mozharness/extern
# %include taskcluster/docker/recipes/hgrc
COPY topsrcdir/taskcluster/docker/recipes/hgrc /etc/mercurial/hgrc.d/mozilla.rc
# Add pip configuration, among other things.
# %include taskcluster/docker/recipes/dot-config
COPY topsrcdir/taskcluster/docker/recipes/dot-config /builds/worker/.config
-# %include taskcluster/docker/recipes/run-task
-COPY topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+COPY topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
--- a/taskcluster/docker/decision/Dockerfile
+++ b/taskcluster/docker/decision/Dockerfile
@@ -17,17 +17,17 @@ ADD topsrcdir/testing/mozharness/externa
COPY topsrcdir/taskcluster/docker/recipes/hgrc /etc/mercurial/hgrc.d/mozilla.rc
# %include taskcluster/docker/recipes/install-mercurial.sh
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /tmp/install-mercurial.sh
ADD system-setup.sh /tmp/system-setup.sh
RUN bash /tmp/system-setup.sh
-# %include taskcluster/docker/recipes/run-task
-ADD topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
ENV PATH=/builds/worker/bin:$PATH \
SHELL=/bin/bash \
HOME=/builds/worker
# Set a default command useful for debugging
CMD ["/bin/bash", "--login"]
--- a/taskcluster/docker/desktop1604-test/Dockerfile
+++ b/taskcluster/docker/desktop1604-test/Dockerfile
@@ -39,18 +39,18 @@ ADD topsrcdir/testing/config/tooltool-ma
# %include taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh
ADD topsrcdir/taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh /setup/system-setup.sh
RUN bash /setup/system-setup.sh
# Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
# %include taskcluster/docker/recipes/xvfb.sh
ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /builds/worker/scripts/xvfb.sh
-# %include taskcluster/docker/recipes/run-task
-ADD topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
# %include taskcluster/scripts/tester/test-linux.sh
ADD topsrcdir/taskcluster/scripts/tester/test-linux.sh /builds/worker/bin/test-linux.sh
ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/worker/scripts/tooltool.py
# Set variable normally configured at login, by the shells parent process, these
# are taken from GNU su manual
--- a/taskcluster/docker/diffoscope/Dockerfile
+++ b/taskcluster/docker/diffoscope/Dockerfile
@@ -29,15 +29,15 @@ RUN apt-get update -q && \
sed -i '/en_US.UTF-8/s/^# *//' /etc/locale.gen && \
locale-gen && \
git clone https://anonscm.debian.org/git/reproducible/diffoscope.git /tmp/diffoscope && \
git -C /tmp/diffoscope checkout 202caf9d5d134e95f870d5f19f89511d635c27e4 && \
(cd /tmp/diffoscope && python3 setup.py install ) && \
rm -rf /tmp/diffoscope && \
apt-get clean
-# %include taskcluster/docker/recipes/run-task
-COPY topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+COPY topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
COPY get_and_diffoscope /builds/worker/bin/get_and_diffoscope
RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
--- a/taskcluster/docker/image_builder/Dockerfile
+++ b/taskcluster/docker/image_builder/Dockerfile
@@ -10,18 +10,18 @@ ADD topsrcdir/taskcluster/docker/recipes
ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
# %include testing/mozharness/external_tools/robustcheckout.py
ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
# %include taskcluster/docker/recipes/hgrc
COPY topsrcdir/taskcluster/docker/recipes/hgrc /etc/mercurial/hgrc.d/mozilla.rc
-# %include taskcluster/docker/recipes/run-task
-ADD topsrcdir/taskcluster/docker/recipes/run-task /usr/local/bin/run-task
+# %include taskcluster/scripts/run-task
+ADD topsrcdir/taskcluster/scripts/run-task /usr/local/bin/run-task
# Add and run setup script
ADD build-image.sh /usr/local/bin/build-image.sh
ADD download-and-compress /usr/local/bin/download-and-compress
ADD setup.sh /setup/setup.sh
RUN bash /setup/setup.sh
# Setup a workspace that won't use AUFS.
--- a/taskcluster/docker/lint/Dockerfile
+++ b/taskcluster/docker/lint/Dockerfile
@@ -29,18 +29,18 @@ ADD topsrcdir/tools/lint/eslint/manifest
# %include tools/lint/eslint/eslint-plugin-mozilla/manifest.tt
ADD topsrcdir/tools/lint/eslint/eslint-plugin-mozilla/manifest.tt /tmp/eslint-plugin-mozilla.tt
# %include tools/lint/python/flake8_requirements.txt
ADD topsrcdir/tools/lint/python/flake8_requirements.txt /tmp/flake8_requirements.txt
# %include tools/lint/tox/tox_requirements.txt
ADD topsrcdir/tools/lint/tox/tox_requirements.txt /tmp/tox_requirements.txt
RUN bash /tmp/system-setup.sh
-# %include taskcluster/docker/recipes/run-task
-ADD topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
# Set variable normally configured at login, by the shells parent process, these
# are taken from GNU su manual
ENV HOME /builds/worker
ENV SHELL /bin/bash
ENV USER worker
ENV LOGNAME worker
--- a/taskcluster/docker/update-verify/Dockerfile
+++ b/taskcluster/docker/update-verify/Dockerfile
@@ -41,18 +41,18 @@ ADD topsrcdir/tools/lint/eslint/manifest
# %include tools/lint/eslint/eslint-plugin-mozilla/manifest.tt
ADD topsrcdir/tools/lint/eslint/eslint-plugin-mozilla/manifest.tt /tmp/eslint-plugin-mozilla.tt
# %include tools/lint/python/flake8_requirements.txt
ADD topsrcdir/tools/lint/python/flake8_requirements.txt /tmp/flake8_requirements.txt
# %include tools/lint/tox/tox_requirements.txt
ADD topsrcdir/tools/lint/tox/tox_requirements.txt /tmp/tox_requirements.txt
RUN bash /tmp/system-setup.sh
-# %include taskcluster/docker/recipes/run-task
-ADD topsrcdir/taskcluster/docker/recipes/run-task /builds/worker/bin/run-task
+# %include taskcluster/scripts/run-task
+ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task
RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
# Set variable normally configured at login, by the shells parent process, these
# are taken from GNU su manual
ENV HOME /builds/worker
ENV SHELL /bin/bash
ENV USER worker
ENV LOGNAME worker
rename from taskcluster/docker/recipes/run-task
rename to taskcluster/scripts/run-task
--- a/taskcluster/taskgraph/transforms/job/run_task.py
+++ b/taskcluster/taskgraph/transforms/job/run_task.py
@@ -74,17 +74,17 @@ def docker_worker_run_task(config, job,
if run.get('cache-dotcache'):
worker['caches'].append({
'type': 'persistent',
'name': 'level-{level}-{project}-dotcache'.format(**config.params),
'mount-point': '/builds/worker/.cache',
'skip-untrusted': True,
})
- # This must match EXIT_PURGE_CACHES in taskcluster/docker/recipes/run-task
+ # This must match EXIT_PURGE_CACHES in taskcluster/scripts/run-task
worker.setdefault('retry-exit-status', []).append(72)
worker.setdefault('purge-caches-exit-status', []).append(72)
run_command = run['command']
if isinstance(run_command, basestring):
run_command = ['bash', '-cx', run_command]
command = ['/builds/worker/bin/run-task']
add_checkout_to_command(run, command)
@@ -97,17 +97,17 @@ def docker_worker_run_task(config, job,
@run_job_using("native-engine", "run-task", schema=run_task_schema)
def native_engine_run_task(config, job, taskdesc):
run = job['run']
worker = taskdesc['worker'] = job['worker']
common_setup(config, job, taskdesc)
- worker['context'] = '{}/raw-file/{}/taskcluster/docker/recipes/run-task'.format(
+ worker['context'] = '{}/raw-file/{}/taskcluster/scripts/run-task'.format(
config.params['head_repository'], config.params['head_rev']
)
if run.get('cache-dotcache'):
raise Exception("No cache support on native-worker; can't use cache-dotcache")
run_command = run['command']
if isinstance(run_command, basestring):
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -31,17 +31,17 @@ from taskgraph.util.schema import (
from taskgraph.util.scriptworker import (
BALROG_ACTIONS,
get_release_config,
)
from voluptuous import Any, Required, Optional, Extra
from taskgraph import GECKO, MAX_DEPENDENCIES
from ..util import docker as dockerutil
-RUN_TASK = os.path.join(GECKO, 'taskcluster', 'docker', 'recipes', 'run-task')
+RUN_TASK = os.path.join(GECKO, 'taskcluster', 'scripts', 'run-task')
@memoize
def _run_task_suffix():
"""String to append to cache names under control of run-task."""
return hash_path(RUN_TASK)[0:20]