Bug 1355731 - Move tooltool to mozbuild.action. r=gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 22 Feb 2017 17:20:41 +0900
changeset 563030 64a5d7598d60a0914348c286e8d0a29030f3fb8b
parent 562868 1a1069b27f40edbfbcf1aa81a5e7dfb39845a5fe
child 563031 ffd1bf7a3ef682c9a3df7e50f6cf3cfd32dbe471
push id54193
push userbmo:mh+mozilla@glandium.org
push dateFri, 14 Apr 2017 21:55:43 +0000
reviewersgps
bugs1355731
milestone55.0a1
Bug 1355731 - Move tooltool to mozbuild.action. r=gps
python/mozbuild/mozbuild/action/tooltool.py
taskcluster/docker/decision/Dockerfile
taskcluster/docker/desktop-build/Dockerfile
taskcluster/docker/desktop-test/Dockerfile
taskcluster/docker/desktop1604-test/Dockerfile
taskcluster/docker/image_builder/Dockerfile
taskcluster/docker/lint/Dockerfile
taskcluster/docker/recipes/tooltool.py
taskcluster/scripts/builder/build-haz-linux.sh
taskcluster/scripts/builder/sm-tooltool-config.sh
taskcluster/scripts/misc/build-clang-windows-helper32.sh
taskcluster/scripts/misc/build-clang-windows-helper64.sh
taskcluster/scripts/misc/tooltool-download.sh
testing/awsy/mach_commands.py
testing/mozharness/mozharness/mozilla/tooltool.py
rename from taskcluster/docker/recipes/tooltool.py
rename to python/mozbuild/mozbuild/action/tooltool.py
--- a/taskcluster/docker/decision/Dockerfile
+++ b/taskcluster/docker/decision/Dockerfile
@@ -1,17 +1,17 @@
 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 taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /tmp/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /tmp/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
 
 # %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
--- a/taskcluster/docker/desktop-build/Dockerfile
+++ b/taskcluster/docker/desktop-build/Dockerfile
@@ -6,19 +6,19 @@ MAINTAINER    Dustin J. Mitchell <dustin
 VOLUME /home/worker/workspace
 VOLUME /home/worker/tooltool-cache
 
 # Add build scripts; these are the entry points from the taskcluster worker, and
 # operate on environment variables
 ADD             bin /home/worker/bin
 RUN             chmod +x /home/worker/bin/*
 
-# %include taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /builds/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
 
 # %include taskcluster/docker/recipes/common.sh
 ADD topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
--- a/taskcluster/docker/desktop-test/Dockerfile
+++ b/taskcluster/docker/desktop-test/Dockerfile
@@ -1,16 +1,16 @@
 FROM          ubuntu:12.04
 MAINTAINER    Jonas Finnemann Jensen <jopsen@gmail.com>
 
 RUN useradd -d /home/worker -s /bin/bash -m worker
 WORKDIR /home/worker
 
-# %include taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
 ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /tmp/install-mercurial.sh
 
 # Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
--- a/taskcluster/docker/desktop1604-test/Dockerfile
+++ b/taskcluster/docker/desktop1604-test/Dockerfile
@@ -1,16 +1,16 @@
 FROM          ubuntu:16.04
 MAINTAINER    Joel Maher <joel.maher@gmail.com>
 
 RUN useradd -d /home/worker -s /bin/bash -m worker
 WORKDIR /home/worker
 
-# %include taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
 
 # %include taskcluster/docker/recipes/common.sh
 ADD topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
--- a/taskcluster/docker/image_builder/Dockerfile
+++ b/taskcluster/docker/image_builder/Dockerfile
@@ -1,12 +1,12 @@
 FROM ubuntu:16.04
 
-# %include taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /setup/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
 
 # %include taskcluster/docker/recipes/common.sh
 ADD topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
 ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
 
 # %include testing/mozharness/external_tools/robustcheckout.py
--- a/taskcluster/docker/lint/Dockerfile
+++ b/taskcluster/docker/lint/Dockerfile
@@ -1,17 +1,17 @@
 FROM          ubuntu:16.04
 MAINTAINER    Andrew Halberstadt <ahalberstadt@mozilla.com>
 
 RUN useradd -d /home/worker -s /bin/bash -m worker
 WORKDIR /home/worker
 
 RUN mkdir /build
-# %include taskcluster/docker/recipes/tooltool.py
-ADD topsrcdir/taskcluster/docker/recipes/tooltool.py /build/tooltool.py
+# %include python/mozbuild/mozbuild/action/tooltool.py
+ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /build/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
 
 # %include taskcluster/docker/recipes/install-node.sh
 ADD topsrcdir/taskcluster/docker/recipes/install-node.sh /build/install-node.sh
 
 # %include taskcluster/docker/recipes/install-mercurial.sh
--- a/taskcluster/scripts/builder/build-haz-linux.sh
+++ b/taskcluster/scripts/builder/build-haz-linux.sh
@@ -49,17 +49,17 @@ GECKO_DIR=$( cd "$GECKO_DIR" && pwd )
 # Directory to populate with tooltool-installed tools
 export TOOLTOOL_DIR="$WORKSPACE"
 
 # Directory to hold the (useless) object files generated by the analysis.
 export MOZ_OBJDIR="$WORKSPACE/obj-analyzed"
 mkdir -p "$MOZ_OBJDIR"
 
 if [ -n "$DO_TOOLTOOL" ]; then
-  ( cd $TOOLTOOL_DIR; python $GECKO_DIR/taskcluster/docker/recipes/tooltool.py --url https://api.pub.build.mozilla.org/tooltool/ -m $GECKO_DIR/$TOOLTOOL_MANIFEST fetch -c $TOOLTOOL_CACHE )
+  ( cd $TOOLTOOL_DIR; python $GECKO_DIR/python/mozbuild/mozbuild/action/tooltool.py --url https://api.pub.build.mozilla.org/tooltool/ -m $GECKO_DIR/$TOOLTOOL_MANIFEST fetch -c $TOOLTOOL_CACHE )
 fi
 
 export NO_MERCURIAL_SETUP_CHECK=1
 
 if [[ "$PROJECT" = "browser" ]]; then (
     cd "$WORKSPACE"
     set "$WORKSPACE"
     . setup-ccache.sh
--- a/taskcluster/scripts/builder/sm-tooltool-config.sh
+++ b/taskcluster/scripts/builder/sm-tooltool-config.sh
@@ -42,9 +42,9 @@ esac
 # necessary for the JS shell, but it's less duplication to share tooltool
 # manifests.
 BROWSER_PLATFORM=$PLATFORM_OS$BITS
 : ${TOOLTOOL_MANIFEST:=browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest}
 
 : ${TOOLTOOL_CHECKOUT:=$WORK}
 export TOOLTOOL_CHECKOUT
 
-(cd $TOOLTOOL_CHECKOUT && python ${SRCDIR}/taskcluster/docker/recipes/tooltool.py --url $TOOLTOOL_SERVER -m $SRCDIR/$TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})
+(cd $TOOLTOOL_CHECKOUT && python ${SRCDIR}/python/mozbuild/mozbuild/action/tooltool.py --url $TOOLTOOL_SERVER -m $SRCDIR/$TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})
--- a/taskcluster/scripts/misc/build-clang-windows-helper32.sh
+++ b/taskcluster/scripts/misc/build-clang-windows-helper32.sh
@@ -1,26 +1,26 @@
 #!/bin/bash
 
 set -x -e -v
 
 # This script is for building clang-cl on Windows.
 
-chmod +x build/src/taskcluster/docker/recipes/tooltool.py
+chmod +x build/src/python/mozbuild/mozbuild/action/tooltool.py
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
 export TOOLTOOL_CACHE
 
 TOOLTOOL_AUTH_FILE=/c/builds/relengapi.tok
 if [ ! -e ${TOOLTOOL_AUTH_FILE} ]; then
     echo cannot find ${TOOLTOOL_AUTH_FILE}
     exit 1
 fi
 
 TOOLTOOL_MANIFEST=build/src/browser/config/tooltool-manifests/win32/build-clang-cl.manifest
-./build/src/taskcluster/docker/recipes/tooltool.py --authentication-file="${TOOLTOOL_AUTH_FILE}" -m "${TOOLTOOL_MANIFEST}" fetch
+./build/src/python/mozbuild/mozbuild/action/tooltool.py --authentication-file="${TOOLTOOL_AUTH_FILE}" -m "${TOOLTOOL_MANIFEST}" fetch
 
 # Set up all the Visual Studio paths.
 MSVC_DIR=vs2015u3
 VSWINPATH="$(cd ${MSVC_DIR} && pwd)"
 
 echo vswinpath ${VSWINPATH}
 
 export WINDOWSSDKDIR="${VSWINPATH}/SDK"
--- a/taskcluster/scripts/misc/build-clang-windows-helper64.sh
+++ b/taskcluster/scripts/misc/build-clang-windows-helper64.sh
@@ -1,26 +1,26 @@
 #!/bin/bash
 
 set -x -e -v
 
 # This script is for building clang-cl on Windows.
 
-chmod +x build/src/taskcluster/docker/recipes/tooltool.py
+chmod +x build/src/python/mozbuild/mozbuild/action/tooltool.py
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
 export TOOLTOOL_CACHE
 
 TOOLTOOL_AUTH_FILE=/c/builds/relengapi.tok
 if [ ! -e ${TOOLTOOL_AUTH_FILE} ]; then
     echo cannot find ${TOOLTOOL_AUTH_FILE}
     exit 1
 fi
 
 TOOLTOOL_MANIFEST=build/src/browser/config/tooltool-manifests/win32/build-clang-cl.manifest
-./build/src/taskcluster/docker/recipes/tooltool.py --authentication-file="${TOOLTOOL_AUTH_FILE}" -m "${TOOLTOOL_MANIFEST}" fetch
+./build/src/python/mozbuild/mozbuild/action/tooltool.py --authentication-file="${TOOLTOOL_AUTH_FILE}" -m "${TOOLTOOL_MANIFEST}" fetch
 
 # Set up all the Visual Studio paths.
 MSVC_DIR=vs2015u3
 VSWINPATH="$(cd ${MSVC_DIR} && pwd)"
 
 echo vswinpath ${VSWINPATH}
 
 export WINDOWSSDKDIR="${VSWINPATH}/SDK"
--- a/taskcluster/scripts/misc/tooltool-download.sh
+++ b/taskcluster/scripts/misc/tooltool-download.sh
@@ -1,11 +1,11 @@
 # Fetch a tooltool manifest.
 
 cd $HOME/workspace/build/src
 
-chmod +x taskcluster/docker/recipes/tooltool.py
+chmod +x python/mozbuild/mozbuild/action/tooltool.py
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
 export TOOLTOOL_CACHE
 
-./taskcluster/docker/recipes/tooltool.py --url=http://relengapi/tooltool/ -m "${TOOLTOOL_MANIFEST}" fetch
+./python/mozbuild/mozbuild/action/tooltool.py --url=http://relengapi/tooltool/ -m "${TOOLTOOL_MANIFEST}" fetch
 
 cd $OLDPWD
--- a/testing/awsy/mach_commands.py
+++ b/testing/awsy/mach_commands.py
@@ -100,17 +100,17 @@ class MachCommands(MachCommandBase):
 
         if not kwargs['webRootDir']:
             # Populate the Awsy webroot if not specified by the user.
             manifest_file = os.path.join(self.topsrcdir,
                                          'testing',
                                          'awsy',
                                          'tp5n-pageset.manifest')
             tooltool_args = {"args": [
-                os.path.join(self.topsrcdir, "taskcluster/docker/recipes/tooltool.py"),
+                os.path.join(self.topsrcdir, "python/mozbuild/mozbuild/action/tooltool.py"),
                 "--manifest=%s" % manifest_file,
                 "--unpack",
                 "--cache-folder=%s" % os.path.join(self.topsrcdir, "tooltool-cache"),
                 "fetch"
             ]}
 
             self.run_process(cwd=page_load_test_dir, **tooltool_args)
             tp5nzip = os.path.join(page_load_test_dir, 'tp5n.zip')
--- a/testing/mozharness/mozharness/mozilla/tooltool.py
+++ b/testing/mozharness/mozharness/mozilla/tooltool.py
@@ -46,18 +46,18 @@ class TooltoolMixin(object):
 
     def tooltool_fetch(self, manifest,
                        output_dir=None, privileged=False, cache=None):
         """docstring for tooltool_fetch"""
         # Use vendored tooltool.py if available.
         if self.topsrcdir:
             cmd = [
                 sys.executable,
-                os.path.join(self.topsrcdir, 'taskcluster', 'docker', 'recipes',
-                                'tooltool.py')
+                os.path.join(self.topsrcdir, 'python', 'mozbuild', 'mozbuild',
+                                'action', 'tooltool.py')
             ]
         elif self.config.get("download_tooltool"):
             cmd = [sys.executable, self._fetch_tooltool_py()]
         else:
             cmd = self.query_exe('tooltool.py', return_type='list')
 
         # get the tooltool servers from configuration
         default_urls = self.config.get('tooltool_servers', TOOLTOOL_SERVERS)