Bug 1498413 - Move redundant files from tb-snap Docker image to recipes directory. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D203303 --HG-- rename : taskcluster/docker/tb-snap/build_desktop_file.py => taskcluster/docker/recipes/build_desktop_file.py rename : taskcluster/docker/tb-snap/fluent_requirements.txt => taskcluster/docker/recipes/fluent_requirements.txt rename : taskcluster/docker/tb-snap/org.mozilla.thunderbird.desktop.jinja2 => taskcluster/docker/recipes/org.mozilla.thunderbird.desktop.jinja2 extra : amend_source : f744c9806b998e0133debc189ce5d4438c3818df
This commit is contained in:
Родитель
bd51efcdd9
Коммит
12b544cad7
|
@ -1,6 +1,7 @@
|
|||
# /!\ The base image must follow the version of the `coreXX` package
|
||||
# https://forum.snapcraft.io/t/issues-dockerizing-a-snapcraft-build-process/30294/5
|
||||
FROM ubuntu:jammy
|
||||
MAINTAINER daniel@thunderbird.net
|
||||
|
||||
# Install dependencies and generate locales
|
||||
RUN apt-get update && \
|
||||
|
@ -24,6 +25,7 @@ RUN apt-get update && \
|
|||
ENV LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
LC_ALL="en_US.UTF-8" \
|
||||
VENV_DIR="/scripts" \
|
||||
SNAP="/snap/snapcraft/current" \
|
||||
SNAP_NAME="snapcraft" \
|
||||
SNAP_ARCH="amd64" \
|
||||
|
@ -42,8 +44,15 @@ WORKDIR /scripts/
|
|||
# Copy everything in the docker/tb-snap folder but the Dockerfile
|
||||
COPY [^D]* /scripts/
|
||||
|
||||
# Copy required recipes
|
||||
# %include comm/taskcluster/docker/recipes
|
||||
COPY topsrcdir/comm/taskcluster/docker/recipes/make_venv.sh /scripts/make_venv.sh
|
||||
COPY topsrcdir/comm/taskcluster/docker/recipes/fluent_requirements.txt /scripts/fluent_requirements.txt
|
||||
COPY topsrcdir/comm/taskcluster/docker/recipes/build_desktop_file.py /scripts/build_desktop_file.py
|
||||
COPY topsrcdir/comm/taskcluster/docker/recipes/org.mozilla.thunderbird.desktop.jinja2 /scripts/org.mozilla.thunderbird.desktop.jinja2
|
||||
|
||||
# Set up Python virtual environment
|
||||
RUN /scripts/make_venv.sh
|
||||
RUN /scripts/make_venv.sh /scripts/fluent_requirements.txt
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -xe
|
||||
|
||||
# Check if scripts directory exists
|
||||
cd /scripts || exit 1
|
||||
|
||||
# Create Python virtual environment and install dependencies
|
||||
python -m venv --system-site-packages venv
|
||||
source ./venv/bin/activate
|
||||
python -m pip install -r fluent_requirements.txt
|
|
@ -48,11 +48,11 @@ done
|
|||
|
||||
# Download artifacts from dependencies and build the .desktop file.
|
||||
(
|
||||
source /scripts/venv/bin/activate
|
||||
python3 /scripts/build_desktop_file.py -o "$WORKSPACE/org.mozilla.thunderbird.desktop" \
|
||||
-t "/scripts/org.mozilla.thunderbird.desktop.jinja2" \
|
||||
-l "$WORKSPACE/l10n-central" \
|
||||
-L "$WORKSPACE/l10n-changesets.json" \
|
||||
source "${SCRIPT_DIR}/venv/bin/activate"
|
||||
python3 "${SCRIPT_DIR}/build_desktop_file.py" -o "${WORKSPACE}/org.mozilla.thunderbird.desktop" \
|
||||
-t "${SCRIPT_DIR}/org.mozilla.thunderbird.desktop.jinja2" \
|
||||
-l "${WORKSPACE}/l10n-central" \
|
||||
-L "${WORKSPACE}/l10n-changesets.json" \
|
||||
-f "mail/branding/thunderbird/brand.ftl" \
|
||||
-f "mail/messenger/flatpak.ftl"
|
||||
)
|
||||
|
@ -74,7 +74,7 @@ apt-get update
|
|||
cp -v "$SCRIPT_DIR/tmpdir.sh" "$SOURCE_DEST"
|
||||
|
||||
# Generate snapcraft manifest
|
||||
sed -e "s/@VERSION@/${VERSION}/g" -e "s/@BUILD_NUMBER@/${BUILD_NUMBER}/g" "${PRODUCT}.snapcraft.yaml.in" > "${WORKSPACE}/snapcraft.yaml"
|
||||
sed -e "s/@VERSION@/${VERSION}/g" -e "s/@BUILD_NUMBER@/${BUILD_NUMBER}/g" "${SCRIPT_DIR}/${PRODUCT}.snapcraft.yaml.in" > "${WORKSPACE}/snapcraft.yaml"
|
||||
cd "${WORKSPACE}"
|
||||
|
||||
# Make sure snapcraft knows we're building for amd64
|
||||
|
|
Загрузка…
Ссылка в новой задаче