Skip to content

Commit 1024339

Browse files
vpolikarpov-akvelonsergei-pyshnoigithub-actions[bot]459680Actions service account
authored
Sync recent changes to windows-new-dir-hierarchy (#8680)
* [MacOS] Add xcode 15.0.1 (#8604) * Updating readme file for macos-13 version 20231018.14 (#8601) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * Updating readme file for macos-13-arm64 version 20231017.1 (#8586) Co-authored-by: Image generation service account <no-reply@microsoft.com> * [MacOS] improve errexit option handling (#8432) * [MacOS] improve errexit option handling * Prevent prompting for override when unzipping * Explicitly allow failing when installing virtualbox * Remove libtcl symlinks * Add debug output * Updating readme file for ubuntu20 version 20231022.1.1 (#8637) Co-authored-by: Image generation service account <no-reply@microsoft.com> * Updating readme file for ubuntu22 version 20231022.1.1 (#8636) Co-authored-by: Image generation service account <no-reply@microsoft.com> * Updating readme file for win19 version 20231023.1.1 (#8644) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * Updating readme file for win22 version 20231023.1.1 (#8643) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * [macos] simplify "brew_smart_install" helper (#8639) * [macos] homebrew: use hardcoded condition for jq installation we cannot use "jq" if we are asked to install "jq" * [macos] always use "brew install" * [macos] add retries to "get_github_package_download_url" helper * [macos] add retries to chrome install script * [macos] add retries to OpenJDK install script * [macos] add retries to miniconda installer * Update images/macos/provision/core/openjdk.sh Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> * fix copy-paste error * Update images/macos/provision/core/openjdk.sh Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> * Update images/macos/provision/core/openjdk.sh Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> --------- Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> * Updating readme file for ubuntu22 version 20231025.1.1 (#8663) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * Updating readme file for ubuntu20 version 20231025.1.1 (#8664) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * Updating readme file for win22 version 20231024.1.1 (#8668) Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> * Windows Server 2019 (20231025) Image Update (#8667) * Updating readme file for win19 version 20231025.2.1 * Update Windows2019-Readme.md --------- Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Co-authored-by: Actions service account <no-reply@github.com> * [Mac OS] Fix logic for retrying AppleScript execution (#8662) * [Ubuntu] Add PGP validation for swift (#8652) * [Windows] Remove out-of-support vs components (#8678) * [MacOS] Unpin Virtualbox (#8653) * [MacOS] Unpin Virtualbox * Remove obsolete virtualbox kext pester test --------- Co-authored-by: sergei-pyshnoi <121864472+sergei-pyshnoi@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Actions service account <no-reply@github.com> Co-authored-by: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Co-authored-by: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com>
1 parent 80118e5 commit 1024339

18 files changed

+485
-516
lines changed

images/linux/Ubuntu2004-Readme.md

Lines changed: 59 additions & 62 deletions
Large diffs are not rendered by default.

images/linux/Ubuntu2204-Readme.md

Lines changed: 63 additions & 66 deletions
Large diffs are not rendered by default.

images/linux/scripts/installers/swift.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ swift_tar_name="swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz"
1515
swift_tar_url="https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/$swift_tar_name"
1616
download_with_retries $swift_tar_url "/tmp" "$swift_tar_name"
1717

18+
# Verifing pgp signature using official swift pgp key. Referring to https://www.swift.org/install/linux/#Installation-via-Tarball
19+
# Download swift pgp key
20+
download_with_retries "https://swift.org/keys/all-keys.asc" "/tmp" "all-keys.asc"
21+
# Import swift pgp key
22+
gpg --no-default-keyring --keyring swift --import /tmp/all-keys.asc
23+
# Download signature file
24+
download_with_retries "$swift_tar_url.sig" "/tmp" "$swift_tar_name.sig"
25+
# Verify signature
26+
gpg --no-default-keyring --keyring swift --verify "/tmp/$swift_tar_name.sig" "/tmp/$swift_tar_name"
27+
# Remove swift pgp public key with temporary keyring
28+
rm ~/.gnupg/swift
29+
30+
1831
tar xzf /tmp/$swift_tar_name
1932

2033
SWIFT_INSTALL_ROOT="/usr/share/swift"

images/macos/macos-13-Readme.md

Lines changed: 77 additions & 75 deletions
Large diffs are not rendered by default.

images/macos/macos-13-arm64-Readme.md

Lines changed: 71 additions & 42 deletions
Large diffs are not rendered by default.

images/macos/provision/core/android-toolsets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ sdkTools="android-sdk-tools.zip"
126126
sdkToolsVersion=$(get_toolset_value '.android."sdk-tools"')
127127
if [ "$sdkToolsVersion" != "null" ]; then
128128
download_with_retries "https://dl.google.com/android/repository/${sdkToolsVersion}" "." $sdkTools
129-
unzip -qq $sdkTools -d ${ANDROID_SDK_ROOT}
129+
unzip -o -qq $sdkTools -d ${ANDROID_SDK_ROOT}
130130
rm -f $sdkTools
131131
fi
132132

images/macos/provision/core/chrome.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ echo "Google Chrome version is $FULL_CHROME_VERSION"
1414
# Get Google Chrome versions information
1515
CHROME_PLATFORM="mac-$arch"
1616
CHROME_VERSIONS_URL="https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build-with-downloads.json"
17-
CHROME_VERSIONS_JSON=$(curl -fsSL "${CHROME_VERSIONS_URL}")
17+
download_with_retries "$CHROME_VERSIONS_URL" "/tmp" "latest-patch-versions-per-build-with-downloads.json"
18+
CHROME_VERSIONS_JSON=$(cat /tmp/latest-patch-versions-per-build-with-downloads.json)
1819

1920
# Download and unpack the latest release of Chrome Driver
2021
CHROMEDRIVER_VERSION=$(echo "${CHROME_VERSIONS_JSON}" | jq -r '.builds["'"$CHROME_VERSION"'"].version')

images/macos/provision/core/commonutils.sh

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,7 @@ done
1313
cask_packages=$(get_toolset_value '.brew.cask_packages[]')
1414
for package in $cask_packages; do
1515
echo "Installing $package..."
16-
if [[ $package == "virtualbox" ]]; then
17-
if ! is_Ventura || ! is_VenturaArm64; then
18-
# VirtualBox 7 crashes
19-
# macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now.
20-
vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb"
21-
download_with_retries $vbcask_url
22-
brew install ./virtualbox.rb
23-
rm ./virtualbox.rb
24-
fi
25-
else
26-
brew install --cask $package
27-
fi
16+
brew install --cask $package
2817
done
2918

3019
# Load "Parallels International GmbH"
@@ -36,18 +25,24 @@ fi
3625
# System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now
3726
if is_Monterey; then
3827
if is_Veertu; then
39-
retry=5
40-
while [ $retry -gt 0 ]; do
28+
for retry in {4..0}; do
29+
echo "Executing AppleScript to change security preferences. Retries left: $retry"
4130
{
31+
set -e
4232
osascript -e 'tell application "System Events" to get application processes where visible is true'
43-
}
44-
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
33+
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
34+
} && break
35+
36+
if [ "$retry" -eq 0 ]; then
37+
echo "Executing AppleScript failed. No retries left"
38+
exit 1
39+
fi
4540

46-
retry=$((retry-1))
47-
echo "retries left "$retry
41+
echo "Executing AppleScript failed. Sleeping for 10 seconds and retrying"
4842
sleep 10
4943
done
5044
else
45+
echo "Executing AppleScript to change security preferences"
5146
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
5247
fi
5348
fi
@@ -82,13 +77,5 @@ bazel
8277
# Install Azure DevOps extension for Azure Command Line Interface
8378
az extension add -n azure-devops
8479

85-
# Workaround https://github.com/actions/runner-images/issues/4931
86-
# by making Tcl/Tk paths the same on macOS 10.15 and macOS 11
87-
if is_Monterey; then
88-
version=$(brew info tcl-tk --json | jq -r '.[].installed[].version')
89-
ln -s /usr/local/Cellar/tcl-tk/$version/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
90-
ln -s /usr/local/Cellar/tcl-tk/$version/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib
91-
fi
92-
9380
# Invoke tests for all basic tools
9481
invoke_tests "BasicTools"

images/macos/provision/core/miniconda.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash -e -o pipefail
22

3-
MINICONDA_INSTALLER="/tmp/miniconda.sh"
4-
curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
5-
chmod +x $MINICONDA_INSTALLER
6-
sudo $MINICONDA_INSTALLER -b -p /usr/local/miniconda
3+
source ~/utils/utils.sh
4+
5+
download_with_retries "https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh" "/tmp" "miniconda.sh"
6+
7+
chmod +x /tmp/miniconda.sh
8+
sudo /tmp/miniconda.sh -b -p /usr/local/miniconda
79

810
# Chmod with full permissions recursively to avoid permissions restrictions
911
sudo chmod -R 777 /usr/local/miniconda

images/macos/provision/core/openjdk.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ installOpenJDK() {
2929
local JAVA_VERSION=$1
3030

3131
# Get link for Java binaries and Java version
32-
assetUrl=$(curl -fsSL "https://api.adoptium.net/v3/assets/latest/${JAVA_VERSION}/hotspot")
32+
download_with_retries "https://api.adoptium.net/v3/assets/latest/${JAVA_VERSION}/hotspot" "/tmp" "openjdk-hotspot.json"
3333

3434
if [[ $arch == "arm64" ]]; then
35-
asset=$(echo ${assetUrl} | jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="aarch64")')
35+
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="aarch64")' /tmp/openjdk-hotspot.json)
3636
else
37-
asset=$(echo ${assetUrl} | jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="x64")')
37+
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="x64")' /tmp/openjdk-hotspot.json)
3838
fi
3939

4040
archivePath=$(echo ${asset} | jq -r '.binary.package.link')

0 commit comments

Comments
 (0)