[focus] Deal with taskgraph changing paths to the cloned source
[gecko.git] / mobile / android / focus-android / taskcluster / scripts / toolchain / android-gradle-dependencies / before.sh
blob4ffce6c3bebc7b45d3c741ed00b532f17816fac5
1 #!/bin/bash
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # This is a copy of
8 # https://searchfox.org/mozilla-central/rev/2cd2d511c0d94a34fb7fa3b746f54170ee759e35/taskcluster/scripts/misc/android-gradle-dependencies/before.sh.
9 # `misc` was renamed into `toolchain` and `/builds/worker/workspace/build` was changed into
10 # `/builds/worker/checkouts/`
12 set -x -e
14 echo "running as" $(id)
16 : WORKSPACE ${WORKSPACE:=/builds/worker/workspace}
18 set -v
20 mkdir -p ${NEXUS_WORK}/conf
21 cp /builds/worker/checkouts/vcs/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml ${NEXUS_WORK}/conf/nexus.xml
23 PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/:$PATH" RUN_AS_USER=worker /opt/sonatype/nexus/bin/nexus restart
25 # Wait "a while" for Nexus to actually start. Don't fail if this fails.
26 wget --quiet --retry-connrefused --waitretry=2 --tries=100 \
27 http://localhost:8081/nexus/service/local/status || true
28 rm -rf status
30 # It's helpful when debugging to see the "latest state".
31 curl http://localhost:8081/nexus/service/local/status || true
33 # Verify Nexus has actually started. Fail if this fails.
34 curl --fail --silent --location http://localhost:8081/nexus/service/local/status | grep '<state>STARTED</state>'
36 # It's helpful when debugging to see the repository configurations.
37 curl http://localhost:8081/nexus/service/local/repositories || true