From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../docker/system-symbols-win-gfx/Dockerfile | 25 +++++++++ taskcluster/docker/system-symbols-win-gfx/run.sh | 59 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 taskcluster/docker/system-symbols-win-gfx/Dockerfile create mode 100755 taskcluster/docker/system-symbols-win-gfx/run.sh (limited to 'taskcluster/docker/system-symbols-win-gfx') 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 + +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 -- cgit v1.2.3