devops: stop publishing Ubuntu 20.04 (#3031)

This commit is contained in:
Max Schmitt 2024-10-21 16:59:51 +02:00 коммит произвёл GitHub
Родитель 57426b23f0
Коммит e6e6da44a4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 8 добавлений и 55 удалений

Просмотреть файл

@ -9,7 +9,7 @@ on:
jobs:
trigger:
name: "trigger"
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- run: |
curl -X POST \

Просмотреть файл

@ -1,34 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=America/Los_Angeles
ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/dotnet:v%version%-focal"
# === INSTALL dependencies ===
RUN apt-get update && \
# Feature-parity with node.js base images.
apt-get install -y --no-install-recommends git openssh-client curl gpg && \
# clean apt cache
rm -rf /var/lib/apt/lists/* && \
# Create the pwuser
adduser pwuser
# === BAKE BROWSERS INTO IMAGE ===
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# 1. Add tip-of-tree Playwright package to install its browsers.
# The package should be built beforehand from tip-of-tree Playwright.
COPY ./dist/ /tmp/playwright-dotnet
# 2. Bake in browsers & deps.
# Browsers will be downloaded in `/ms-playwright`.
# Note: make sure to set 777 to the registry so that any user can access
# registry.
RUN mkdir /ms-playwright && \
/tmp/playwright-dotnet/playwright.ps1 install --with-deps && \
/tmp/playwright-dotnet/playwright.ps1 mark-docker-image "${DOCKER_IMAGE_NAME_TEMPLATE}" && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
chmod -R 777 /ms-playwright

Просмотреть файл

@ -3,12 +3,12 @@ set -e
set +x
if [[ ($1 == '--help') || ($1 == '-h') || ($1 == '') || ($2 == '') ]]; then
echo "usage: $(basename $0) {--arm64,--amd64} {focal,jammy} playwright:localbuild-focal"
echo "usage: $(basename $0) {--arm64,--amd64} {jammy,noble} playwright:localbuild-noble"
echo
echo "Build Playwright docker image and tag it as 'playwright:localbuild-focal'."
echo "Build Playwright docker image and tag it as 'playwright:localbuild-noble'."
echo "Once image is built, you can run it with"
echo ""
echo " docker run --rm -it playwright:localbuild-focal /bin/bash"
echo " docker run --rm -it playwright:localbuild-noble /bin/bash"
echo ""
echo "NOTE: this requires on Playwright dependencies to be installed with 'npm install'"
echo " and Playwright itself being built with 'npm run build'"

Просмотреть файл

@ -21,11 +21,6 @@ else
exit 1
fi
# Ubuntu 20.04
FOCAL_TAGS=(
"v${PW_VERSION}-focal"
)
# Ubuntu 22.04
JAMMY_TAGS=(
"v${PW_VERSION}-jammy"
@ -69,14 +64,12 @@ install_oras_if_needed() {
publish_docker_images_with_arch_suffix() {
local FLAVOR="$1"
local TAGS=()
if [[ "$FLAVOR" == "focal" ]]; then
TAGS=("${FOCAL_TAGS[@]}")
elif [[ "$FLAVOR" == "jammy" ]]; then
if [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy' or 'noble'"
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'jammy' or 'noble'"
exit 1
fi
local ARCH="$2"
@ -97,14 +90,12 @@ publish_docker_images_with_arch_suffix() {
publish_docker_manifest () {
local FLAVOR="$1"
local TAGS=()
if [[ "$FLAVOR" == "focal" ]]; then
TAGS=("${FOCAL_TAGS[@]}")
elif [[ "$FLAVOR" == "jammy" ]]; then
if [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy' or 'noble'"
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'jammy' or 'noble'"
exit 1
fi
@ -123,10 +114,6 @@ publish_docker_manifest () {
done
}
publish_docker_images_with_arch_suffix focal amd64
publish_docker_images_with_arch_suffix focal arm64
publish_docker_manifest focal amd64 arm64
publish_docker_images_with_arch_suffix jammy amd64
publish_docker_images_with_arch_suffix jammy arm64
publish_docker_manifest jammy amd64 arm64