summaryrefslogtreecommitdiffstats
path: root/taskcluster/docker/system-symbols-win-gfx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /taskcluster/docker/system-symbols-win-gfx
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/docker/system-symbols-win-gfx')
-rw-r--r--taskcluster/docker/system-symbols-win-gfx/Dockerfile25
-rwxr-xr-xtaskcluster/docker/system-symbols-win-gfx/run.sh59
2 files changed, 84 insertions, 0 deletions
diff --git a/taskcluster/docker/system-symbols-win-gfx/Dockerfile b/taskcluster/docker/system-symbols-win-gfx/Dockerfile
new file mode 100644
index 0000000000..babd658023
--- /dev/null
+++ b/taskcluster/docker/system-symbols-win-gfx/Dockerfile
@@ -0,0 +1,25 @@
+FROM $DOCKER_IMAGE_PARENT
+MAINTAINER Gabriele Svelto <gsvelto@mozilla.com>
+
+RUN mkdir -p /builds
+RUN id worker || useradd -d /builds/worker -s /bin/bash -m worker
+WORKDIR /builds/worker
+
+# We need to declare all potentially cache volumes as caches. Also,
+# making high I/O paths volumes increase I/O throughput because of
+# AUFS slowness.
+VOLUME /builds/worker/checkouts
+
+RUN apt-get update && \
+ apt-get install --no-install-recommends -y \
+ 7zip build-essential curl jq python3-pip unzip wget zip && \
+ apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
+
+COPY run.sh /builds/worker/run.sh
+
+RUN chown -R worker:worker /builds/worker
+
+RUN pip3 install --break-system-packages crashstats-tools==1.4.0
+
+# Set a default command useful for debugging
+CMD ["/bin/bash", "--login"]
diff --git a/taskcluster/docker/system-symbols-win-gfx/run.sh b/taskcluster/docker/system-symbols-win-gfx/run.sh
new file mode 100755
index 0000000000..34c01f3e4b
--- /dev/null
+++ b/taskcluster/docker/system-symbols-win-gfx/run.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -ex
+
+SHA256SUMS="SHA256SUMS.zip"
+
+function get_route()
+{
+ local task_url="${TASKCLUSTER_ROOT_URL}/api/queue/v1/task/${TASK_ID}"
+ local payload
+ payload=$(curl -sSL "${task_url}")
+
+ local route
+ route=$(echo "${payload}" | jq -r '.routes[] | select(contains("latest")) | select(contains("pushdate") | not) ' | sed -e 's/^index\.//')
+ echo "${route}"
+}
+
+function get_sha256sum_url()
+{
+ local route
+ route=$(get_route)
+ local sha256sums_url="${TASKCLUSTER_ROOT_URL}/api/index/v1/task/${route}/artifacts/public/build/${SHA256SUMS}"
+ echo "${sha256sums_url}"
+}
+
+function has_sha256sums_on_index()
+{
+ local url
+ url=$(get_sha256sum_url)
+ curl -sSL --head --fail -o /dev/null "${url}"
+}
+
+function download_extract_sha256sums()
+{
+ local url=$1
+ curl -sSL "${url}" -o "${SHA256SUMS}"
+ unzip "${SHA256SUMS}" && rm "${SHA256SUMS}"
+}
+
+if has_sha256sums_on_index; then
+ sha256=$(get_sha256sum_url)
+fi
+
+mkdir -p /builds/worker/artifacts/
+
+pushd "${MOZ_FETCHES_DIR}/symbol-scrapers/windows-graphics-drivers"
+ if [ -z "${sha256}" ]; then
+ touch SHA256SUMS # First run, create the file
+ else
+ download_extract_sha256sums "${sha256}"
+ fi
+
+ DUMP_SYMS="${MOZ_FETCHES_DIR}/dump_syms/dump_syms" /bin/bash -x script.sh
+ zip -r9 "/builds/worker/artifacts/${SHA256SUMS}" SHA256SUMS
+popd
+
+if [ ! -f "/builds/worker/artifacts/target.crashreporter-symbols.zip" ]; then
+ echo "No symbols zip produced, upload task will fail"
+fi