diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /taskcluster/docker/update-verify | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/docker/update-verify')
-rw-r--r-- | taskcluster/docker/update-verify/Dockerfile | 55 | ||||
-rw-r--r-- | taskcluster/docker/update-verify/system-setup.sh | 45 |
2 files changed, 100 insertions, 0 deletions
diff --git a/taskcluster/docker/update-verify/Dockerfile b/taskcluster/docker/update-verify/Dockerfile new file mode 100644 index 0000000000..153c16b7ae --- /dev/null +++ b/taskcluster/docker/update-verify/Dockerfile @@ -0,0 +1,55 @@ +# This is an LTS! We should upgrade after the next LTS is released, unless +# we've switched to the in-tree debian base images by then. +FROM ubuntu:20.04 + +MAINTAINER release@mozilla.com + +RUN dpkg --add-architecture i386 && apt-get -q update \ + # p7zip-full is for extracting Windows and OS X packages + # wget is for downloading update.xml, installers, and MARs + # libgtk-3-0 and libgtk2.0-0 are required to run the Firefox updater + && apt-get -q --yes install p7zip-full wget libgtk-3-0 libgtk-3.0:i386 libgtk2.0-0 libgtk2.0-0:i386 \ + && apt-get clean + +RUN mkdir /builds +RUN groupadd -g 1000 worker +RUN useradd -u 1000 -g 1000 -d /builds/worker -s /bin/bash -m worker +WORKDIR /builds/worker + +VOLUME /builds/worker/.cache +VOLUME /builds/worker/checkouts + +RUN mkdir /build +# %include python/mozbuild/mozbuild/action/tooltool.py +ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /build/tooltool.py + +# %include testing/mozharness/external_tools/robustcheckout.py +ADD topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py + +# %include taskcluster/docker/recipes/hgrc +COPY topsrcdir/taskcluster/docker/recipes/hgrc /etc/mercurial/hgrc.d/mozilla.rc + +# %include taskcluster/docker/recipes/install-mercurial.sh +ADD topsrcdir/taskcluster/docker/recipes/install-mercurial.sh /build/install-mercurial.sh +ADD system-setup.sh /tmp/system-setup.sh +RUN bash /tmp/system-setup.sh + +# %include taskcluster/scripts/run-task +ADD topsrcdir/taskcluster/scripts/run-task /builds/worker/bin/run-task +# %include taskcluster/scripts/misc/fetch-content +ADD topsrcdir/taskcluster/scripts/misc/fetch-content /builds/worker/bin/fetch-content +RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/* +ENV PATH $PATH:/builds/worker/bin + +# Set variable normally configured at login, by the shells parent process, these +# are taken from GNU su manual +ENV HOME /builds/worker +ENV SHELL /bin/bash +ENV USER worker +ENV LOGNAME worker +ENV HOSTNAME taskcluster-worker +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + +# Set a default command useful for debugging +CMD ["/bin/bash", "--login"] diff --git a/taskcluster/docker/update-verify/system-setup.sh b/taskcluster/docker/update-verify/system-setup.sh new file mode 100644 index 0000000000..69738d920a --- /dev/null +++ b/taskcluster/docker/update-verify/system-setup.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# This allows ubuntu-desktop to be installed without human interaction +export DEBIAN_FRONTEND=noninteractive + +set -ve + +test "$(whoami)" == 'root' + +mkdir -p /setup +cd /setup + +apt_packages=() +apt_packages+=('curl') +apt_packages+=('locales') +apt_packages+=('git') +apt_packages+=('python3') +apt_packages+=('python3-pip') +apt_packages+=('shellcheck') +apt_packages+=('sudo') +apt_packages+=('wget') +apt_packages+=('xz-utils') + +apt-get update +apt-get install -y "${apt_packages[@]}" + +# Without this we get spurious "LC_ALL: cannot change locale (en_US.UTF-8)" errors, +# and python scripts raise UnicodeEncodeError when trying to print unicode characters. +locale-gen en_US.UTF-8 +dpkg-reconfigure locales + +su -c 'git config --global user.email "worker@mozilla.test"' worker +su -c 'git config --global user.name "worker"' worker + +tooltool_fetch() { + cat >manifest.tt + /build/tooltool.py fetch + rm manifest.tt +} + +cd /build +# shellcheck disable=SC1091 +. install-mercurial.sh + +cd / +rm -rf /setup |