Bug 1383973 - "Rebase" android-gradle-build back onto desktop-build. r=dustin draft
authorNick Alexander <nalexander@mozilla.com>
Fri, 11 Aug 2017 15:14:55 -0700
changeset 645255 265937bc9ba3bc4c18756b6c675100a62929bafe
parent 645254 cd7a8402259139f37ec649bb5dc39317fe2fc3cb
child 645256 f94e6b9b780f96038c60d3825039a0f94add0404
push id73719
push usernalexander@mozilla.com
push dateSat, 12 Aug 2017 03:10:52 +0000
reviewersdustin
bugs1383973
milestone57.0a1
Bug 1383973 - "Rebase" android-gradle-build back onto desktop-build. r=dustin We really want the Android build image to inherit from desktop-build, but that isn't possible with the current `docker-image: in-tree:` support. Therefore, way back in the mists of time, I culted android-gradle-build from desktop-build. This moves it back (mostly) in line with desktop-build, which has advanced. MozReview-Commit-ID: 6GmuxHjhAbv
taskcluster/docker/android-gradle-build/Dockerfile
--- a/taskcluster/docker/android-gradle-build/Dockerfile
+++ b/taskcluster/docker/android-gradle-build/Dockerfile
@@ -5,22 +5,57 @@ MAINTAINER    Nick Alexander <nalexander
 # BEGIN ../desktop-build/Dockerfile
 
 # TODO remove when base image is updated
 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/*
+COPY bin /home/worker/bin
+RUN chmod +x /home/worker/bin/*
+
+# %include python/mozbuild/mozbuild/action/tooltool.py
+COPY topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /build/tooltool.py
+COPY topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/tooltool.py
+COPY topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
+COPY topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /tmp/tooltool.py
+
+# %include testing/mozharness/external_tools/robustcheckout.py
+COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
+
+# %include taskcluster/docker/recipes/common.sh
+COPY topsrcdir/taskcluster/docker/recipes/common.sh /setup/common.sh
+
+# %include taskcluster/docker/recipes/install-mercurial.sh
+COPY topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /setup/install-mercurial.sh
+
+# %include taskcluster/docker/recipes/install-make.sh
+COPY topsrcdir/taskcluster/docker/recipes/install-make.sh /setup/install-make.sh
+
+# %include taskcluster/docker/recipes/install-cmake.sh
+COPY topsrcdir/taskcluster/docker/recipes/install-cmake.sh /setup/install-cmake.sh
+
+# %include taskcluster/docker/recipes/centos6-build-system-setup.sh
+COPY topsrcdir/taskcluster/docker/recipes/centos6-build-system-setup.sh /setup/system-setup.sh
+
+# %include taskcluster/docker/recipes/centos-install-debug-symbols.sh
+COPY topsrcdir/taskcluster/docker/recipes/centos-install-debug-symbols.sh /setup/install-debug-symbols.sh
+
+# TODO remove once base image doesn't install Mercurial
+RUN pip uninstall -y Mercurial
+
+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 /home/worker/scripts/xvfb.sh
+COPY topsrcdir/taskcluster/docker/recipes/xvfb.sh /home/worker/scripts/xvfb.sh
+
+# %include taskcluster/docker/recipes/run-task
+COPY topsrcdir/taskcluster/docker/recipes/run-task /home/worker/bin/run-task
 
 # Add configuration
 COPY            dot-config                    /home/worker/.config
 
 # Generate machine uuid file
 RUN dbus-uuidgen --ensure=/var/lib/dbus/machine-id
 
 # Stubbed out credentials; mozharness looks for this file an issues a WARNING
@@ -29,21 +64,16 @@ RUN dbus-uuidgen --ensure=/var/lib/dbus/
 # mozharness is run (not its --work-dir).  See Bug 1169652.
 ADD           oauth.txt /home/worker/
 
 # stubbed out buildprops, which keeps mozharness from choking
 # Note that this needs to be in the parent of the workspace directory and in
 # the directory where mozharness is run (not its --work-dir)
 ADD           buildprops.json /home/worker/
 
-# install tooltool directly from github where tooltool_wrapper.sh et al. expect
-# to find it
-RUN wget -O /builds/tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
-RUN chmod +x /builds/tooltool.py
-
 # END ../desktop-build/Dockerfile
 
 # Reset user/workdir from parent image so we can install software.
 WORKDIR /
 USER root
 
 # Update base.
 RUN rpm --rebuilddb && yum upgrade -y
@@ -82,18 +112,13 @@ RUN sha1sum --check nexus-${NEXUS_VERSIO
 
 RUN tar zxf nexus-${NEXUS_VERSION}-bundle.tar.gz \
   && mv /tmp/nexus-${NEXUS_VERSION}/* /opt/sonatype/nexus/ \
   && rm -rf /tmp/nexus-${NEXUS_VERSION} \
   && rm -rf /tmp/nexus-${NEXUS_VERSION}-bundle.tar.gz
 
 COPY nexus.xml /workspace/nexus/conf/nexus.xml
 
-# Install tooltool directly from github.
-RUN mkdir /build
-ADD https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py /build/tooltool.py
-RUN chmod +rx /build/tooltool.py
-
 # Back to the centos6-build workdir, matching desktop-build.
 WORKDIR /home/worker
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]