Bug 1391476 - Don't install nexus.xml in a Docker volume; r?nalexander
We're about to ban files in Docker volumes so they behave almost
identically to caches (which start empty).
We move the install of nexus.xml from Docker image time to
task time. This also means that changes to nexus.xml don't result
in having to rebuild the Docker image.
MozReview-Commit-ID: JIjeJN4mt2
--- a/taskcluster/docker/android-gradle-build/Dockerfile
+++ b/taskcluster/docker/android-gradle-build/Dockerfile
@@ -108,15 +108,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
# So that we don't have to RUN_AS_USER=root.
RUN chown -R worker:worker /opt/sonatype/nexus/
-COPY nexus.xml /home/worker/workspace/nexus/conf/nexus.xml
-
# Back to the centos6-build workdir, matching desktop-build.
WORKDIR /home/worker
# Set a default command useful for debugging
CMD ["/bin/bash", "--login"]
--- a/taskcluster/scripts/builder/build-android-dependencies/before.sh
+++ b/taskcluster/scripts/builder/build-android-dependencies/before.sh
@@ -3,16 +3,19 @@
set -x -e
echo "running as" $(id)
: WORKSPACE ${WORKSPACE:=/home/worker/workspace}
set -v
+mkdir -p ${WORKSPACE}/nexus/conf
+cp /home/worker/workspace/build/src/taskcluster/scripts/builder/build-android-dependencies/nexus.xml ${WORKSPACE}/nexus/conf/nexus.xml
+
# Populate /home/worker/workspace/build/src/java_home.
. $WORKSPACE/build/src/taskcluster/scripts/builder/build-android-dependencies/repackage-jdk-centos.sh
mv $WORKSPACE/java/usr/lib/jvm/java_home $WORKSPACE/build/src/java_home
export JAVA_HOME=$WORKSPACE/build/src/java_home
export PATH=$PATH:$JAVA_HOME/bin
rename from taskcluster/docker/android-gradle-build/nexus.xml
rename to taskcluster/scripts/builder/build-android-dependencies/nexus.xml