update all feature scripts to support `jammy` (& update regression testing parameters) (#1464)
* test against jammy * update regression * conditionally install libssl3.0 or libssl1.1 depending on distro support (https://github.com/microsoft/vscode-dev-containers/issues/1458) * bump ruby regression test to 3.1.2 * swap libssl condition check and friendlier error * even friendlier * update regression * add ssh group if it does not exist * install tigervnc-tools to get vncpasswd on new ubuntu versions, if needed (https://github.com/microsoft/vscode-dev-containers/issues/1428) * test against a more meaningful oryx image * update powershell script dropping dependency missing in ubuntu 22.04
This commit is contained in:
Родитель
983f5b06bb
Коммит
053a055721
|
@ -13,7 +13,7 @@ jobs:
|
|||
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')"
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["debian:bullseye", "debian:buster", "ubuntu:focal", "ubuntu:bionic"] # TODO: Add "ubuntu:jammy"
|
||||
os: ["debian:bullseye", "debian:buster", "ubuntu:focal", "ubuntu:bionic", "ubuntu:jammy"]
|
||||
defaults: ["true", "false"]
|
||||
fail-fast: true
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')"
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["debian:bullseye", "debian:buster", "ubuntu:focal", "ubuntu:jammy", "ubuntu:bionic", alpine, rockylinux, "mcr.microsoft.com/oryx/build:github-actions-20210902.1"]
|
||||
os: ["debian:bullseye", "debian:buster", "ubuntu:focal", "ubuntu:jammy", "ubuntu:bionic", alpine, rockylinux, "mcr.microsoft.com/oryx/build:vso-focal-20220429.1"]
|
||||
defaults: ["true", "false"]
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -56,6 +56,11 @@ package_list="
|
|||
nano \
|
||||
locales"
|
||||
|
||||
# Packages to attempt to install if essential tools are missing (ie: vncpasswd).
|
||||
# This is useful, at least, for Ubuntu 22.04 (jammy)
|
||||
package_list_additional="
|
||||
tigervnc-tools"
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
|
@ -164,6 +169,10 @@ check_packages() {
|
|||
fi
|
||||
}
|
||||
|
||||
##########################
|
||||
# Install starts here #
|
||||
##########################
|
||||
|
||||
# Ensure apt is in non-interactive to avoid prompts
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
@ -191,6 +200,12 @@ fi
|
|||
# Install X11, fluxbox and VS Code dependencies
|
||||
check_packages ${package_list}
|
||||
|
||||
# On newer versions of Ubuntu (22.04),
|
||||
# we need an additional package that isn't provided in earlier versions
|
||||
if ! type vncpasswd > /dev/null 2>&1; then
|
||||
check_packages ${package_list_additional}
|
||||
fi
|
||||
|
||||
# Install Emoji font if available in distro - Available in Debian 10+, Ubuntu 18.04+
|
||||
if dpkg-query -W fonts-noto-color-emoji > /dev/null 2>&1 && ! dpkg -s fonts-noto-color-emoji > /dev/null 2>&1; then
|
||||
apt-get -y install --no-install-recommends fonts-noto-color-emoji
|
||||
|
|
|
@ -18,10 +18,12 @@ ACCESS_GROUP=${6:-"dotnet"}
|
|||
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
DOTNET_ARCHIVE_ARCHITECTURES="amd64"
|
||||
DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute"
|
||||
DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute jammy"
|
||||
# Feed URI sourced from the official dotnet-install.sh
|
||||
# https://github.com/dotnet/install-scripts/blob/1b98b94a6f6d81cc4845eb88e0195fac67caa0a6/src/dotnet-install.sh#L1342-L1343
|
||||
DOTNET_CDN_FEED_URI="https://dotnetcli.azureedge.net"
|
||||
# Ubuntu 22.04 and on do not ship with libssl1.1, which is required for versions of .NET < 6.0
|
||||
DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1="buster bullseye bionic focal hirsute"
|
||||
|
||||
# Exit on failure.
|
||||
set -e
|
||||
|
@ -295,7 +297,14 @@ install_using_dotnet_releases_url() {
|
|||
# - libgcc-s1 OR libgcc1 depending on OS
|
||||
# - the latest libicuXX depending on OS (eg libicu57 for stretch)
|
||||
# - also installs libc6 and libstdc++6 which are required by .NET
|
||||
check_packages curl ca-certificates tar jq icu-devtools libgssapi-krb5-2 libssl1.1 zlib1g
|
||||
check_packages curl ca-certificates tar jq icu-devtools libgssapi-krb5-2 zlib1g
|
||||
|
||||
# Starting with Ubuntu 22.04 (jammy), libssl1.1 does not ship with the OS anymore.
|
||||
if [[ "${DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1}" = *"${VERSION_CODENAME}"* ]]; then
|
||||
check_packages libssl1.1
|
||||
else
|
||||
check_packages libssl3.0
|
||||
fi
|
||||
|
||||
get_full_version_details "${sdk_or_runtime}"
|
||||
# exports DOTNET_DOWNLOAD_URL, DOTNET_DOWNLOAD_HASH, DOTNET_DOWNLOAD_NAME
|
||||
|
@ -343,6 +352,18 @@ EOF
|
|||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Dotnet 3.1 and 5.0 are not supported on Ubuntu 22.04 (jammy)+,
|
||||
# due to lack of libssl3.0 support.
|
||||
# See: https://github.com/microsoft/vscode-dev-containers/issues/1458#issuecomment-1135077775
|
||||
# NOTE: This will only guard against installation of the dotnet versions we propose via 'features'.
|
||||
# The user can attempt to install any other version at their own risk.
|
||||
if [[ "${DOTNET_VERSION}" = "3.1" ]] || [[ "${DOTNET_VERSION}" = "5.0" ]]; then
|
||||
if [[ ! "${DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1}" = *"${VERSION_CODENAME}"* ]]; then
|
||||
err "Dotnet ${DOTNET_VERSION} is not supported on Ubuntu ${VERSION_CODENAME} due to a change in the 'libssl' dependency across distributions.\n Please upgrade your version of dotnet, or downgrade your OS version."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Determine if the user wants to download .NET Runtime only, or .NET SDK & Runtime
|
||||
# and set the appropriate variables.
|
||||
if [ "${DOTNET_RUNTIME_ONLY}" = "true" ]; then
|
||||
|
@ -362,13 +383,15 @@ architecture="$(dpkg --print-architecture)"
|
|||
|
||||
use_dotnet_releases_url="false"
|
||||
if [[ "${DOTNET_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${DOTNET_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then
|
||||
echo "Detected ${VERSION_CODENAME} on ${architecture}. Attempting to install dotnet from apt"
|
||||
install_using_apt "${DOTNET_SDK_OR_RUNTIME}" || use_dotnet_releases_url="true"
|
||||
else
|
||||
use_dotnet_releases_url="true"
|
||||
fi
|
||||
|
||||
if [ "${use_dotnet_releases_url}" = "true" ]; then
|
||||
install_using_dotnet_releases_url "${DOTNET_SDK_OR_RUNTIME}"
|
||||
echo "Could not install dotnet from apt. Attempting to install dotnet from releases url"
|
||||
install_using_dotnet_releases_url "${DOTNET_SDK_OR_RUNTIME}"
|
||||
fi
|
||||
|
||||
echo "Done!"
|
|
@ -122,7 +122,7 @@ install_using_apt() {
|
|||
|
||||
install_using_github() {
|
||||
# Fall back on direct download if no apt package exists in microsoft pool
|
||||
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 liblttng-ust0 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
|
||||
check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
|
||||
if ! type git > /dev/null 2>&1; then
|
||||
apt_get_update_if_needed
|
||||
apt-get install -y --no-install-recommends git
|
||||
|
|
|
@ -13,7 +13,8 @@ POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal"
|
|||
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
|
||||
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
|
||||
DOTNET_ARCHIVE_ARCHITECTURES="amd64"
|
||||
DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute"
|
||||
DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute jammy"
|
||||
DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1="buster bullseye bionic focal hirsute"
|
||||
DOTNET_CDN_FEED_URI="https://dotnetcli.azureedge.net"
|
||||
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
|
|
|
@ -75,6 +75,13 @@ elif [ "${NEW_PASSWORD}" != "skip" ]; then
|
|||
echo "${USERNAME}:${NEW_PASSWORD}" | chpasswd
|
||||
fi
|
||||
|
||||
if [ $(getent group ssh) ]; then
|
||||
echo "'ssh' group already exists."
|
||||
else
|
||||
echo "adding 'ssh' group, as it does not already exist."
|
||||
groupadd ssh
|
||||
fi
|
||||
|
||||
# Add user to ssh group
|
||||
if [ "${USERNAME}" != "root" ]; then
|
||||
usermod -aG ssh ${USERNAME}
|
||||
|
|
|
@ -95,6 +95,18 @@ fi
|
|||
|
||||
# Debian/Ubuntu specific tests
|
||||
if [ "${DISTRO}" = "debian" ]; then
|
||||
|
||||
# dotnet
|
||||
get_common_setting DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1
|
||||
if [[ "${DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1}" = *"${VERSION_CODENAME}"* ]]; then
|
||||
run_script dotnet "3.1 true ${USERNAME} false /opt/dotnet dotnet"
|
||||
|
||||
else
|
||||
run_script dotnet "6.0 true ${USERNAME} false /opt/dotnet dotnet"
|
||||
fi
|
||||
|
||||
run_script ruby "false" "3.1.2"
|
||||
run_script python "3.10 /opt/python /opt/python-tools ${USERNAME} false false"
|
||||
run_script awscli
|
||||
run_script azcli
|
||||
run_script fish "false ${USERNAME}"
|
||||
|
@ -106,8 +118,6 @@ if [ "${DISTRO}" = "debian" ]; then
|
|||
run_script kubectl-helm "latest latest latest"
|
||||
run_script maven "3.6.3 /usr/local/sdkman3 ${USERNAME} false"
|
||||
run_script node "/usr/local/share/nvm 14 ${USERNAME}"
|
||||
run_script python "3.4.10 /opt/python /opt/python-tools ${USERNAME} false false"
|
||||
run_script ruby "${USERNAME} false" "2.7.3"
|
||||
run_script rust "/opt/rust/cargo /opt/rust/rustup ${USERNAME} false"
|
||||
run_script terraform "0.15.0 0.12.1"
|
||||
run_script sshd "2223 ${USERNAME} true random"
|
||||
|
@ -132,7 +142,6 @@ if [ "${DISTRO}" = "debian" ]; then
|
|||
if [ "${architecture}" = "amd64" ] || [ "${architecture}" = "x86_64" ]; then
|
||||
run_script homebrew "${USERNAME} false true /home/${USERNAME}/linuxbrew"
|
||||
fi
|
||||
run_script dotnet "3.1 true ${USERNAME} false /opt/dotnet dotnet"
|
||||
fi
|
||||
|
||||
# TODO: Most of this script does not execute since 'docker-in-docker' is run above
|
||||
|
|
Загрузка…
Ссылка в новой задаче