diff --git a/images.CI/macos/anka/Anka.Helpers.psm1 b/images.CI/macos/anka/Anka.Helpers.psm1 index 97dabeebcf5d..f566e8c2d6e2 100644 --- a/images.CI/macos/anka/Anka.Helpers.psm1 +++ b/images.CI/macos/anka/Anka.Helpers.psm1 @@ -139,10 +139,7 @@ function Set-AnkaVMVideoController { ) $command = "anka modify $VMName set display -c $Controller" - # Apple Metal is available starting from Big Sur - if (-not $ShortMacOSVersion.StartsWith("10.")) { - $null = Invoke-AnkaCommand -Command $command - } + $null = Invoke-AnkaCommand -Command $command } function Set-AnkaVMDisplayResolution { diff --git a/images/macos/scripts/build/configure-machine.sh b/images/macos/scripts/build/configure-machine.sh index 294935000dab..438587fe9a57 100644 --- a/images/macos/scripts/build/configure-machine.sh +++ b/images/macos/scripts/build/configure-machine.sh @@ -17,14 +17,7 @@ sudo rm -f /var/vm/sleepimage defaults write NSGlobalDomain NSAppSleepDisabled -bool YES # Disable Keyboard Setup Assistant window -if is_Veertu; then - sudo defaults write /Library/Preferences/com.apple.keyboardtype "keyboardtype" -dict-add "3-7582-0" -int 40 -fi - -# Change screen resolution to the maximum supported for 4Mb video memory -if [[ -d "/Library/Application Support/VMware Tools" ]]; then - sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885 -fi +sudo defaults write /Library/Preferences/com.apple.keyboardtype "keyboardtype" -dict-add "3-7582-0" -int 40 # Update VoiceOver Utility to allow VoiceOver to be controlled with AppleScript # by creating a special Accessibility DB file (SIP must be disabled) and @@ -39,7 +32,6 @@ defaults write com.apple.VoiceOver4/default SCREnableAppleScript -bool YES # Rotate the certificate before expiration to ensure your apps are installed and signed with an active certificate. # Confirm that the correct intermediate certificate is installed by verifying the expiration date is set to 2030. # sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain -# Big Sur requires user interaction to add a cert https://developer.apple.com/forums/thread/671582, we need to use a workaround with SecItemAdd swift method swiftc -suppress-warnings "${HOME}/image-generation/add-certificate.swift" @@ -58,7 +50,7 @@ done rm -f ./add-certificate # enable-automationmode-without-authentication -if ! is_BigSur; then + retry=10 while [[ $retry -gt 0 ]]; do { @@ -84,16 +76,15 @@ EOF sleep 10 done - echo "Getting terminal windows" - term_service=$(launchctl list | grep -i terminal | cut -f3) - echo "Close terminal windows: gui/501/${term_service}" - launchctl bootout gui/501/${term_service} && sleep 5 +echo "Getting terminal windows" +term_service=$(launchctl list | grep -i terminal | cut -f3) +echo "Close terminal windows: gui/501/${term_service}" +launchctl bootout gui/501/${term_service} && sleep 5 - # test enable-automationmode-without-authentication - if [[ ! "$(automationmodetool)" =~ "DOES NOT REQUIRE" ]]; then - echo "Failed to enable enable-automationmode-without-authentication option" - exit 1 - fi +# test enable-automationmode-without-authentication +if [[ ! "$(automationmodetool)" =~ "DOES NOT REQUIRE" ]]; then + echo "Failed to enable enable-automationmode-without-authentication option" + exit 1 fi # Create symlink for tests running diff --git a/images/macos/scripts/build/configure-preimagedata.sh b/images/macos/scripts/build/configure-preimagedata.sh index e92b08b1d1bd..d7492d2c4cb0 100644 --- a/images/macos/scripts/build/configure-preimagedata.sh +++ b/images/macos/scripts/build/configure-preimagedata.sh @@ -19,15 +19,9 @@ if [[ $arch == "arm64" ]]; then else image_label="macos-${label_version}" fi -release_label="macOS-${label_version}" -if is_Ventura || is_Sonoma || is_Monterey; then - software_url="https://github.com/actions/runner-images/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md" - releaseUrl="https://github.com/actions/runner-images/releases/tag/${image_label}%2F${image_version}" -else - software_url="https://github.com/actions/runner-images/blob/${release_label}/${image_version}/images/macos/${image_label}-Readme.md" - releaseUrl="https://github.com/actions/runner-images/releases/tag/${release_label}%2F${image_version}" -fi +software_url="https://github.com/actions/runner-images/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md" +releaseUrl="https://github.com/actions/runner-images/releases/tag/${image_label}%2F${image_version}" cat < $imagedata_file [ diff --git a/images/macos/scripts/build/install-aws-tools.sh b/images/macos/scripts/build/install-aws-tools.sh index 168483862136..db4565b73969 100644 --- a/images/macos/scripts/build/install-aws-tools.sh +++ b/images/macos/scripts/build/install-aws-tools.sh @@ -10,11 +10,9 @@ echo "Installing aws..." awscliv2_pkg_path=$(download_with_retry "https://awscli.amazonaws.com/AWSCLIV2.pkg") sudo installer -pkg "$awscliv2_pkg_path" -target / -if ! is_BigSur; then - echo "Installing aws sam cli..." - brew tap aws/tap - brew_smart_install aws-sam-cli -fi +echo "Installing aws sam cli..." +brew tap aws/tap +brew_smart_install aws-sam-cli echo "Install aws cli session manager" brew install --cask session-manager-plugin diff --git a/images/macos/scripts/build/install-common-utils.sh b/images/macos/scripts/build/install-common-utils.sh index 53a0af5804e6..cd0eab214ee2 100644 --- a/images/macos/scripts/build/install-common-utils.sh +++ b/images/macos/scripts/build/install-common-utils.sh @@ -6,12 +6,6 @@ source ~/utils/utils.sh -# Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq -if is_BigSur; then - binary_path=$(download_with_retry "https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_amd64") - sudo install "$binary_path" /usr/local/bin/yq -fi - # Monterey needs future review: # aliyun-cli, gnupg, helm have issues with building from the source code. # Added gmp for now, because toolcache ruby needs its libs. Remove it when php starts to build from source code. @@ -48,27 +42,22 @@ fi # Execute AppleScript to change security preferences # System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now if is_Monterey; then - if is_Veertu; then - for retry in {4..0}; do - echo "Executing AppleScript to change security preferences. Retries left: $retry" - { - set -e - osascript -e 'tell application "System Events" to get application processes where visible is true' - osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD - } && break + for retry in {4..0}; do + echo "Executing AppleScript to change security preferences. Retries left: $retry" + { + set -e + osascript -e 'tell application "System Events" to get application processes where visible is true' + osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD + } && break - if [[ $retry -eq 0 ]]; then - echo "Executing AppleScript failed. No retries left" - exit 1 - fi + if [[ $retry -eq 0 ]]; then + echo "Executing AppleScript failed. No retries left" + exit 1 + fi - echo "Executing AppleScript failed. Sleeping for 10 seconds and retrying" - sleep 10 - done - else - echo "Executing AppleScript to change security preferences" - osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD - fi + echo "Executing AppleScript failed. Sleeping for 10 seconds and retrying" + sleep 10 + done fi # Validate "Parallels International GmbH" kext @@ -95,10 +84,8 @@ if is_Monterey; then echo "export PARALLELS_DMG_URL=$url" >> ${HOME}/.bashrc fi -if ! is_BigSur; then - # Install Azure DevOps extension for Azure Command Line Interface - az extension add -n azure-devops -fi +# Install Azure DevOps extension for Azure Command Line Interface +az extension add -n azure-devops # Invoke tests for all basic tools invoke_tests "BasicTools" diff --git a/images/macos/scripts/build/install-git.sh b/images/macos/scripts/build/install-git.sh index 5a77ba3a49e3..adc3ecccfc40 100644 --- a/images/macos/scripts/build/install-git.sh +++ b/images/macos/scripts/build/install-git.sh @@ -11,16 +11,13 @@ brew_smart_install "git" git config --global --add safe.directory "*" +echo "Installing Git LFS" +brew_smart_install "git-lfs" -if ! is_BigSur; then - echo "Installing Git LFS" - brew_smart_install "git-lfs" - - # Update global git config - git lfs install - # Update system git config - sudo git lfs install --system -fi +# Update global git config +git lfs install +# Update system git config +sudo git lfs install --system echo "Disable all the Git help messages..." git config --global advice.pushUpdateRejected false diff --git a/images/macos/scripts/build/install-node.sh b/images/macos/scripts/build/install-node.sh index a4c4aaeba745..9e8a084b0bea 100644 --- a/images/macos/scripts/build/install-node.sh +++ b/images/macos/scripts/build/install-node.sh @@ -16,7 +16,7 @@ echo Installing yarn... yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh") bash $yarn_installer_path -if is_BigSur || is_Monterey; then +if is_Monterey; then npm_global_packages=$(get_toolset_value '.npm.global_packages[].name') for module in ${npm_global_packages[@]}; do echo "Install $module" diff --git a/images/macos/scripts/build/install-python.sh b/images/macos/scripts/build/install-python.sh index 061c8ccd7a50..426cc4351470 100644 --- a/images/macos/scripts/build/install-python.sh +++ b/images/macos/scripts/build/install-python.sh @@ -8,7 +8,7 @@ source ~/utils/utils.sh echo "Installing Python Tooling" -if is_Monterey || is_BigSur; then +if is_Monterey; then echo "Install latest Python 2" python2_pkg=$(download_with_retry "https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg") python2_pkg_sha256="c570f38b05dd8b112ad21b418cdf51a9816d62f9f44746452739d421be24d50c" @@ -33,9 +33,7 @@ EOF fi # Close Finder window -if is_Veertu; then - close_finder_window -fi +close_finder_window echo "Brew Installing Python 3" brew_smart_install "python@3.12" diff --git a/images/macos/scripts/build/install-rust.sh b/images/macos/scripts/build/install-rust.sh index 37f94353500f..eb9f9f18d08e 100644 --- a/images/macos/scripts/build/install-rust.sh +++ b/images/macos/scripts/build/install-rust.sh @@ -18,7 +18,7 @@ CARGO_HOME=$HOME/.cargo echo "Install common tools..." rustup component add rustfmt clippy -if is_BigSur || is_Monterey; then +if is_Monterey; then cargo install bindgen-cli cbindgen cargo-audit cargo-outdated fi diff --git a/images/macos/scripts/build/install-swiftlint.sh b/images/macos/scripts/build/install-swiftlint.sh index 90a985248bc8..1e781ca26e6d 100644 --- a/images/macos/scripts/build/install-swiftlint.sh +++ b/images/macos/scripts/build/install-swiftlint.sh @@ -7,14 +7,7 @@ source ~/utils/utils.sh echo "Installing Swiftlint..." -if is_BigSur; then - # SwiftLint now requires Swift 5.6 or higher to build, and macOS 12 or higher to run https://github.com/realm/SwiftLint/releases/tag/0.49.0 - COMMIT=d1d5743344227fe6e3c37cfba19f0cfe15a9448a - FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/swiftlint.rb" - - curl -fsSL $FORMULA_URL > $(find $(brew --repository) -name swiftlint.rb) - HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install swiftlint -elif is_Monterey; then +if is_Monterey; then # SwiftLint now requires Xcode 15.3 or higher to build https://github.com/realm/SwiftLint/releases/tag/0.55.1 COMMIT=d91dabd087cb0b906c92a825df9e5e5e1a4f59f8 FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/s/swiftlint.rb" diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index ce141bbe557a..0effe1e54379 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -53,7 +53,7 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+') } $languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion)) -if ((-not $os.IsBigSur) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { +if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { $languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion)) } @@ -63,7 +63,7 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version)) -if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsBigSur)) { +if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("R", $(Get-RVersion)) } @@ -74,7 +74,7 @@ $packageManagement = $installedSoftware.AddHeader("Package Management") $packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion)) $packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion)) $packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion)) -if ((-not $os.IsBigSur) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { +if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { $packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion)) } $packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion)) @@ -118,17 +118,12 @@ $utilities.AddToolVersion("bazelisk", $(Get-BazeliskVersion)) $utilities.AddToolVersion("bsdtar", $(Get-BsdtarVersion)) $utilities.AddToolVersion("Curl", $(Get-CurlVersion)) $utilities.AddToolVersion("Git", $(Get-GitVersion)) -if (-not $os.IsBigSur) { - $utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion)) -} +$utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion)) $utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion)) $utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion)) $utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion)) $utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion)) -if ($os.IsBigSur) { - $utilities.AddToolVersion("helm", $(Get-HelmVersion)) -} -if ((-not $os.IsBigSur) -and (-not $os.IsVentura) -and (-not $os.IsSonoma)) { +if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion)) } $utilities.AddToolVersion("jq", $(Get-JqVersion)) @@ -136,9 +131,6 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $utilities.AddToolVersion("mongo", $(Get-MongoVersion)) $utilities.AddToolVersion("mongod", $(Get-MongodVersion)) } -if ($os.IsBigSur) { - $utilities.AddToolVersion("Newman", $(Get-NewmanVersion)) -} $utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion)) $utilities.AddToolVersion("Packer", $(Get-PackerVersion)) $utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion)) @@ -158,21 +150,14 @@ $utilities.AddToolVersion("zstd", $(Get-ZstdVersion)) # Tools $tools = $installedSoftware.AddHeader("Tools") -if ($os.IsBigSur) { - $tools.AddToolVersion("Aliyun CLI", $(Get-AliyunCLIVersion)) -} if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion)) } $tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion)) -if (-not $os.IsBigSur) { - $tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion)) -} +$tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion)) $tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion)) -if (-not $os.IsBigSur) { - $tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion)) - $tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion)) -} +$tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion)) +$tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion)) $tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion)) if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("Cabal", $(Get-CabalVersion)) @@ -193,13 +178,9 @@ $tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion)) if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $tools.AddToolVersion("Swig", $(Get-SwigVersion)) } -if (-not $os.IsBigSur) { - $tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion)) -} +$tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion)) $tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion)) -if (-not $os.IsBigSur) { - $tools.AddToolVersion("Xcodes", $(Get-XcodesVersion)) -} +$tools.AddToolVersion("Xcodes", $(Get-XcodesVersion)) # Linters $linters = $installedSoftware.AddHeader("Linters") @@ -225,7 +206,6 @@ $toolcache = $installedSoftware.AddHeader("Cached Tools") $toolcache.AddNodes($(Build-ToolcacheSection)) # Rust -if (-not $os.IsBigSur) { $rust = $installedSoftware.AddHeader("Rust Tools") $rust.AddToolVersion("Cargo", $(Get-RustCargoVersion)) $rust.AddToolVersion("Rust", $(Get-RustVersion)) @@ -241,7 +221,6 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { } $rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion)) $rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion)) -} # PowerShell $powerShell = $installedSoftware.AddHeader("PowerShell Tools") @@ -303,7 +282,7 @@ $android.AddTable($androidTable) $androidEnv = $android.AddHeader("Environment variables") $androidEnv.AddTable($(Build-AndroidEnvironmentTable)) -if ($os.IsBigSur -or $os.IsMonterey) { +if ($os.IsMonterey) { $miscellaneous = $installedSoftware.AddHeader("Miscellaneous") $miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion)) $miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion)) diff --git a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 index d2996945a9e4..e58fd1a52760 100644 --- a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 +++ b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 @@ -367,11 +367,6 @@ function Get-BazeliskVersion { return ($bazeliskVersion -replace "^bazelisk").Trim() } -function Get-HelmVersion { - $helmVersion = Run-Command "helm version --short" - return $helmVersion -} - function Get-MongoVersion { $mongo = Run-Command "mongo --version" | Select-String "MongoDB shell version" | Take-Part -Part 3 return $mongo.TrimStart("v").Trim() @@ -397,11 +392,6 @@ function Get-BsdtarVersion { return "$bsdtar - available by 'tar' alias" } -function Get-NewmanVersion { - $newmanVersion = Run-Command "newman --version" - return $newmanVersion -} - function Get-VirtualBoxVersion { $virtualBox = Run-Command "vboxmanage -v" return $virtualBox @@ -457,11 +447,6 @@ function Get-AWSSessionManagerCLIVersion { return $awsSessionManagerVersion } -function Get-AliyunCLIVersion { - $aliyunVersion = Run-Command "aliyun --version" | Select-String "Alibaba Cloud Command Line Interface Version " | Take-Part -Part 6 - return $aliyunVersion -} - function Get-GHCupVersion { $ghcUpVersion = (Run-Command "ghcup --version" | Take-Part -Part 5).Replace('v','') return $ghcUpVersion diff --git a/images/macos/scripts/docs-gen/SoftwareReport.Xcode.psm1 b/images/macos/scripts/docs-gen/SoftwareReport.Xcode.psm1 index 33edda8c1551..cd03d81c41fd 100644 --- a/images/macos/scripts/docs-gen/SoftwareReport.Xcode.psm1 +++ b/images/macos/scripts/docs-gen/SoftwareReport.Xcode.psm1 @@ -236,7 +236,7 @@ function Build-XcodeSupportToolsSection { $xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]" $toolNodes += [ToolVersionNode]::new("xcpretty", $xcpretty) - if ($os.IsBigSur -or $os.IsMonterey) { + if ($os.IsMonterey) { $toolNodes += [ToolVersionNode]::new("xcversion", $xcversion) } @@ -245,10 +245,5 @@ function Build-XcodeSupportToolsSection { $nomadShenzhenOutput = Run-Command "ipa -version" $nomadShenzhen = [regex]::matches($nomadShenzhenOutput, "(\d+.){2}\d+").Value - if ($os.IsBigSur) { - $toolNodes += [ToolVersionNode]::new("Nomad CLI", $nomadCLI) - $toolNodes += [ToolVersionNode]::new("Nomad shenzhen CLI", $nomadShenzhen) - } - return $toolNodes } diff --git a/images/macos/scripts/helpers/Common.Helpers.psm1 b/images/macos/scripts/helpers/Common.Helpers.psm1 index 83259984bda6..c476edc1c050 100644 --- a/images/macos/scripts/helpers/Common.Helpers.psm1 +++ b/images/macos/scripts/helpers/Common.Helpers.psm1 @@ -29,7 +29,6 @@ function Get-OSVersion { Version = $osVersion.Version Platform = $osVersion.Platform IsArm64 = $processorArchitecture -eq "arm64" - IsBigSur = $osVersion.Version.Major -eq "11" IsMonterey = $osVersion.Version.Major -eq "12" IsVentura = $($osVersion.Version.Major -eq "13") IsVenturaArm64 = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -eq "arm64") @@ -104,10 +103,6 @@ function Invoke-DownloadWithRetry { return $Path } -function isVeertu { - return (Test-Path -Path "/Library/Application Support/Veertu") -} - function Get-Architecture { $arch = arch if ($arch -ne "arm64") { diff --git a/images/macos/scripts/helpers/utils.sh b/images/macos/scripts/helpers/utils.sh index 62315cfca8e6..b8e51ee20689 100644 --- a/images/macos/scripts/helpers/utils.sh +++ b/images/macos/scripts/helpers/utils.sh @@ -73,14 +73,6 @@ is_Monterey() { [ "$OSTYPE" = "darwin21" ] } -is_BigSur() { - [ "$OSTYPE" = "darwin20" ] -} - -is_Veertu() { - [[ -d "/Library/Application Support/Veertu" ]] -} - get_toolset_value() { local toolset_path=$(echo "$IMAGE_FOLDER/toolset.json") local query=$1 diff --git a/images/macos/scripts/tests/Android.Tests.ps1 b/images/macos/scripts/tests/Android.Tests.ps1 index 6f73c9a3ff83..654a05e37ad8 100644 --- a/images/macos/scripts/tests/Android.Tests.ps1 +++ b/images/macos/scripts/tests/Android.Tests.ps1 @@ -57,7 +57,7 @@ Describe "Android" { Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" } ) - if ($os.IsBigSur -or $os.IsMonterey) { + if ($os.IsMonterey) { $testCases += @( @{ PackageName = "SDK tools" diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index 7daa7f6b66eb..5fc84bf7b753 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -2,13 +2,13 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" $os = Get-OSVersion -Describe "Azure CLI" -Skip:($os.IsBigSur) { +Describe "Azure CLI" { It "Azure CLI" { "az -v" | Should -ReturnZeroExitCode } } -Describe "Azure DevOps CLI" -Skip:($os.IsBigSur) { +Describe "Azure DevOps CLI" { It "az devops" { "az devops -h" | Should -ReturnZeroExitCode } @@ -62,12 +62,6 @@ Describe "Perl" { } } -Describe "Helm" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsSonoma) { - It "Helm" { - "helm version --short" | Should -ReturnZeroExitCode - } -} - Describe "Tcl/Tk" { It "libtcl" { "file /usr/local/lib/libtcl8.6.dylib" | Should -ReturnZeroExitCode @@ -117,12 +111,6 @@ Describe "bazel" { } } -Describe "Aliyun CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsSonoma) { - It "Aliyun CLI" { - "aliyun --version" | Should -ReturnZeroExitCode - } -} - Describe "Julia" -Skip:($os.IsVentura -or $os.IsSonoma) { It "Julia" { "julia --version" | Should -ReturnZeroExitCode @@ -147,19 +135,19 @@ Describe "wget" { } } -Describe "vagrant" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { +Describe "vagrant" -Skip:($os.IsVentura -or $os.IsSonoma) { It "vagrant" { "vagrant --version" | Should -ReturnZeroExitCode } } -Describe "virtualbox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { +Describe "virtualbox" -Skip:($os.IsVentura -or $os.IsSonoma) { It "virtualbox" { "vboxmanage -v" | Should -ReturnZeroExitCode } } -Describe "R" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsBigSur) { +Describe "R" -Skip:($os.IsVentura -or $os.IsSonoma) { It "R" { "R --version" | Should -ReturnZeroExitCode } @@ -191,7 +179,7 @@ Describe "yq" { } } -Describe "imagemagick" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { +Describe "imagemagick" -Skip:($os.IsVentura -or $os.IsSonoma) { It "imagemagick" { "magick -version" | Should -ReturnZeroExitCode } diff --git a/images/macos/scripts/tests/Common.Tests.ps1 b/images/macos/scripts/tests/Common.Tests.ps1 index 6ce3c53499bf..6ecf158a6677 100644 --- a/images/macos/scripts/tests/Common.Tests.ps1 +++ b/images/macos/scripts/tests/Common.Tests.ps1 @@ -43,7 +43,7 @@ Describe "AWS" { It "AWS CLI" { "aws --version" | Should -ReturnZeroExitCode } - It "AWS SAM CLI" -Skip:($os.IsBigSur) { + It "AWS SAM CLI" { "sam --version" | Should -ReturnZeroExitCode } @@ -123,7 +123,7 @@ Describe "Go" -Skip:($os.IsVentura -or $os.IsSonoma) { } } -Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { +Describe "VirtualBox" -Skip:($os.IsVentura -or $os.IsSonoma) { It "Check kext kernel modules" { kextstat | Out-String | Should -Match "org.virtualbox.kext" } diff --git a/images/macos/scripts/tests/Git.Tests.ps1 b/images/macos/scripts/tests/Git.Tests.ps1 index f216baa0bcd1..c66719a7e708 100644 --- a/images/macos/scripts/tests/Git.Tests.ps1 +++ b/images/macos/scripts/tests/Git.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Git" { It "git is installed" { "git --version" | Should -ReturnZeroExitCode } - It "git lfs is installed" -Skip:($os.IsBigSur) { + It "git lfs is installed" { "git lfs version" | Should -ReturnZeroExitCode } } diff --git a/images/macos/scripts/tests/PHP.Tests.ps1 b/images/macos/scripts/tests/PHP.Tests.ps1 index 9316a06dfb6e..c87b36bb420d 100644 --- a/images/macos/scripts/tests/PHP.Tests.ps1 +++ b/images/macos/scripts/tests/PHP.Tests.ps1 @@ -3,7 +3,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" $os = Get-OSVersion Describe "PHP" { - Context "PHP" -Skip:($os.IsBigSur -or $os.IsVenturaArm64 -or $os.IsSonomaArm64) { + Context "PHP" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) { It "PHP Path" { Get-ToolPath "php" | Should -Not -BeLike "/usr/bin/php*" } @@ -14,7 +14,7 @@ Describe "PHP" { } } - Context "Composer" -Skip:($os.IsBigSur -or $os.IsVenturaArm64 -or $os.IsSonomaArm64) { + Context "Composer" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) { It "Composer" { "composer --version" | Should -ReturnZeroExitCode } diff --git a/images/macos/scripts/tests/Rust.Tests.ps1 b/images/macos/scripts/tests/Rust.Tests.ps1 index fda5475fb44a..b5c1c53fc507 100644 --- a/images/macos/scripts/tests/Rust.Tests.ps1 +++ b/images/macos/scripts/tests/Rust.Tests.ps1 @@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" $os = Get-OSVersion -Describe "Rust" -Skip:($os.IsBigSur) { +Describe "Rust" { Context "Rust" { It "Rustup is installed" { "rustup --version" | Should -ReturnZeroExitCode diff --git a/images/macos/scripts/tests/System.Tests.ps1 b/images/macos/scripts/tests/System.Tests.ps1 index 27fe198bba18..ae6fbd1d4249 100644 --- a/images/macos/scripts/tests/System.Tests.ps1 +++ b/images/macos/scripts/tests/System.Tests.ps1 @@ -35,23 +35,8 @@ Describe "Audio device" -Skip:($os.IsVentura -or $os.IsSonoma) { } } -Describe "Screen Resolution" -Skip:(isVeertu) { - It "Screen Resolution" { - system_profiler SPDisplaysDataType | Select-String "Resolution" | Should -Match "1176 x 885|1920 x 1080" - } -} - -Describe "Open windows" -Skip:(isVeertu) { - It "Opened windows not found" { - 'tell application id "com.apple.systemevents" to get every window of (every process whose class of windows contains window)' | Tee-Object /tmp/windows.osascript - $cmd = "osascript /tmp/windows.osascript" - $openWindows = bash -c $cmd - $openWindows.Split(",").Trim() | Where-Object { $_ -notmatch "NotificationCenter" } | Should -BeNullOrEmpty - } -} - Describe "AutomationModeTool" { - It "Does not require user authentication" -Skip:($os.IsBigSur) { + It "Does not require user authentication" { automationmodetool | Out-String | Should -Match "DOES NOT REQUIRE" } } diff --git a/images/macos/scripts/tests/Xamarin.Tests.ps1 b/images/macos/scripts/tests/Xamarin.Tests.ps1 index 7796b4c59ac6..93de1cd34043 100644 --- a/images/macos/scripts/tests/Xamarin.Tests.ps1 +++ b/images/macos/scripts/tests/Xamarin.Tests.ps1 @@ -8,7 +8,7 @@ if ($os.IsVentura -or $os.IsSonoma) { $XAMARIN_IOS_VERSIONS = @() $XAMARIN_MAC_VERSIONS = @() $XAMARIN_ANDROID_VERSIONS = @() -} elseif ($os.IsBigSur -or $os.IsMonterey) { +} elseif ($os.IsMonterey) { $MONO_VERSIONS = (Get-ToolsetContent).xamarin.mono_versions $XAMARIN_IOS_VERSIONS = (Get-ToolsetContent).xamarin.ios_versions $XAMARIN_MAC_VERSIONS = (Get-ToolsetContent).xamarin.mac_versions diff --git a/images/macos/templates/macOS-11.pkr.hcl b/images/macos/templates/macOS-11.pkr.hcl deleted file mode 100644 index c9dc4256a7ae..000000000000 --- a/images/macos/templates/macOS-11.pkr.hcl +++ /dev/null @@ -1,307 +0,0 @@ -packer { - required_plugins { - vsphere = { - source = "github.com/hashicorp/vsphere" - version = "~> 1" - } - } -} - -locals { - image_folder = "/Users/${var.vm_username}/image-generation" -} - -variable "baseimage_name" { - type = string -} - -variable "build_id" { - type = string -} - -variable "cluster_or_esxi_host" { - type = string -} - -variable "esxi_datastore" { - type = string -} - -variable "github_api_pat" { - type = string - default = "" - sensitive = true -} - -variable "image_os" { - type = string - default = "macos11" -} - -variable "output_folder" { - type = string -} - -variable "vcenter_datacenter" { - type = string -} - -variable "vcenter_password" { - type = string - sensitive = true -} - -variable "vcenter_server" { - type = string -} - -variable "vcenter_username" { - type = string - sensitive = true -} - -variable "vm_password" { - type = string - sensitive = true -} - -variable "vm_username" { - type = string - sensitive = true -} - -variable "xcode_install_sas" { - type = string - sensitive = true -} - -variable "xcode_install_storage_url" { - type = string - sensitive = true -} - -source "vsphere-clone" "template" { - CPUs = "5" - NestedHV = "true" - RAM = "24576" - cpu_cores = "5" - datacenter = "${var.vcenter_datacenter}" - datastore = "${var.esxi_datastore}" - folder = "${var.output_folder}" - host = "${var.cluster_or_esxi_host}" - insecure_connection = true - password = "${var.vcenter_password}" - shutdown_timeout = "15m" - ssh_password = "${var.vm_password}" - ssh_username = "${var.vm_username}" - template = "${var.baseimage_name}" - username = "${var.vcenter_username}" - vcenter_server = "${var.vcenter_server}" - vm_name = "${var.build_id}" -} - -build { - sources = ["source.vsphere-clone.template"] - - provisioner "shell" { - inline = ["mkdir ${local.image_folder}"] - } - - provisioner "file" { - destination = "${local.image_folder}/" - sources = [ - "${path.root}/../assets/xamarin-selector", - "${path.root}/../scripts/tests", - "${path.root}/../scripts/docs-gen", - "${path.root}/../scripts/helpers" - ] - } - - provisioner "file" { - destination = "${local.image_folder}/docs-gen/" - source = "${path.root}/../../../helpers/software-report-base" - } - - provisioner "file" { - destination = "${local.image_folder}/add-certificate.swift" - source = "${path.root}/../assets/add-certificate.swift" - } - - provisioner "file" { - destination = "~/.bashrc" - source = "${path.root}/../assets/bashrc" - } - - provisioner "file" { - destination = "~/.bash_profile" - source = "${path.root}/../assets/bashprofile" - } - - provisioner "shell" { - inline = [ "mkdir ~/bootstrap" ] - } - - provisioner "file" { - destination = "~/bootstrap" - source = "${path.root}/../assets/bootstrap-provisioner/" - } - - provisioner "file" { - destination = "${local.image_folder}/toolset.json" - source = "${path.root}/../toolsets/toolset-11.json" - } - - provisioner "shell" { - execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - inline = [ - "mv ${local.image_folder}/docs-gen ${local.image_folder}/software-report", - "mv ${local.image_folder}/xamarin-selector ${local.image_folder}/assets", - "mkdir ~/utils", - "mv ${local.image_folder}/helpers/confirm-identified-developers.scpt ~/utils", - "mv ${local.image_folder}/helpers/invoke-tests.sh ~/utils", - "mv ${local.image_folder}/helpers/utils.sh ~/utils", - "mv ${local.image_folder}/helpers/xamarin-utils.sh ~/utils" - ] - } - - provisioner "shell" { - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/install-xcode-clt.sh", - "${path.root}/../scripts/build/install-homebrew.sh" - ] - } - - provisioner "shell" { - environment_vars = ["PASSWORD=${var.vm_password}", "USERNAME=${var.vm_username}"] - execute_command = "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/install-xcode-clt.sh", - "${path.root}/../scripts/build/configure-network-interface-detection.sh", - "${path.root}/../scripts/build/configure-autologin.sh", - "${path.root}/../scripts/build/configure-auto-updates.sh", - "${path.root}/../scripts/build/configure-screensaver.sh", - "${path.root}/../scripts/build/configure-ntpconf.sh", - "${path.root}/../scripts/build/configure-max-files-limitation.sh", - "${path.root}/../scripts/build/configure-shell.sh" - ] - } - - provisioner "shell" { - environment_vars = ["IMAGE_VERSION=${var.build_id}", "IMAGE_OS=${var.image_os}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/configure-preimagedata.sh", - "${path.root}/../scripts/build/configure-ssh.sh", - "${path.root}/../scripts/build/configure-machine.sh" - ] - } - - provisioner "shell" { - execute_command = "sudo {{ .Vars }} {{ .Path }}" - expect_disconnect = true - inline = ["echo 'Reboot VM'", "shutdown -r now"] - } - - provisioner "shell" { - environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - pause_before = "30s" - scripts = [ - "${path.root}/../scripts/build/configure-windows.sh", - "${path.root}/../scripts/build/install-powershell.sh", - "${path.root}/../scripts/build/install-dotnet.sh", - "${path.root}/../scripts/build/install-python.sh", - "${path.root}/../scripts/build/install-azcopy.sh", - "${path.root}/../scripts/build/install-openssl.sh", - "${path.root}/../scripts/build/install-ruby.sh", - "${path.root}/../scripts/build/install-rubygems.sh", - "${path.root}/../scripts/build/install-git.sh", - "${path.root}/../scripts/build/install-mongodb.sh", - "${path.root}/../scripts/build/install-node.sh" - ] - } - - provisioner "shell" { - environment_vars = ["XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_SAS=${var.xcode_install_sas}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" - script = "${path.root}/../scripts/build/Install-Xcode.ps1" - } - - provisioner "shell" { - execute_command = "sudo {{ .Vars }} {{ .Path }}" - expect_disconnect = true - inline = ["echo 'Reboot VM'", "shutdown -r now"] - } - - provisioner "shell" { - environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/install-actions-cache.sh", - "${path.root}/../scripts/build/install-common-utils.sh", - "${path.root}/../scripts/build/install-llvm.sh", - "${path.root}/../scripts/build/install-golang.sh", - "${path.root}/../scripts/build/install-swiftlint.sh", - "${path.root}/../scripts/build/install-openjdk.sh", - "${path.root}/../scripts/build/install-aws-tools.sh", - "${path.root}/../scripts/build/install-gcc.sh", - "${path.root}/../scripts/build/install-haskell.sh", - "${path.root}/../scripts/build/install-cocoapods.sh", - "${path.root}/../scripts/build/install-android-sdk.sh", - "${path.root}/../scripts/build/install-xamarin.sh", - "${path.root}/../scripts/build/install-visualstudio.sh", - "${path.root}/../scripts/build/install-nvm.sh", - "${path.root}/../scripts/build/install-apache.sh", - "${path.root}/../scripts/build/install-nginx.sh", - "${path.root}/../scripts/build/install-postgresql.sh", - "${path.root}/../scripts/build/install-audiodevice.sh", - "${path.root}/../scripts/build/install-vcpkg.sh", - "${path.root}/../scripts/build/install-miniconda.sh", - "${path.root}/../scripts/build/install-safari.sh", - "${path.root}/../scripts/build/install-chrome.sh", - "${path.root}/../scripts/build/install-edge.sh", - "${path.root}/../scripts/build/install-firefox.sh", - "${path.root}/../scripts/build/install-pypy.sh", - "${path.root}/../scripts/build/install-pipx-packages.sh", - "${path.root}/../scripts/build/install-bicep.sh", - "${path.root}/../scripts/build/install-codeql-bundle.sh" - ] - } - - provisioner "shell" { - environment_vars = ["IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/Install-Toolset.ps1", - "${path.root}/../scripts/build/Configure-Toolset.ps1" - ] - } - - provisioner "shell" { - execute_command = "ruby {{ .Path }}" - script = "${path.root}/../scripts/build/configure-xcode-simulators.rb" - } - - provisioner "shell" { - environment_vars = ["IMAGE_FOLDER=${local.image_folder}"] - inline = [ - "pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}", - "pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\"" - ] - } - - provisioner "file" { - destination = "${path.root}/../../image-output/" - direction = "download" - source = "${local.image_folder}/output/*" - } - - provisioner "shell" { - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/configure-hostname.sh", - "${path.root}/../scripts/build/configure-system.sh" - ] - } -} diff --git a/images/macos/templates/macOS-12.pkr.hcl b/images/macos/templates/macOS-12.pkr.hcl deleted file mode 100644 index 1c6d2f9caeb9..000000000000 --- a/images/macos/templates/macOS-12.pkr.hcl +++ /dev/null @@ -1,313 +0,0 @@ -packer { - required_plugins { - vsphere = { - source = "github.com/hashicorp/vsphere" - version = "~> 1" - } - } -} - -locals { - image_folder = "/Users/${var.vm_username}/image-generation" -} - -variable "baseimage_name" { - type = string -} - -variable "build_id" { - type = string -} - -variable "cluster_or_esxi_host" { - type = string -} - -variable "esxi_datastore" { - type = string -} - -variable "github_api_pat" { - type = string - default = "" - sensitive = true -} - -variable "image_os" { - type = string - default = "macos12" -} - -variable "output_folder" { - type = string -} - -variable "vcenter_datacenter" { - type = string -} - -variable "vcenter_password" { - type = string - sensitive = true -} - -variable "vcenter_server" { - type = string -} - -variable "vcenter_username" { - type = string - sensitive = true -} - -variable "vm_password" { - type = string - sensitive = true -} - -variable "vm_username" { - type = string - sensitive = true -} - -variable "xcode_install_sas" { - type = string - sensitive = true -} - -variable "xcode_install_storage_url" { - type = string - sensitive = true -} - -source "vsphere-clone" "template" { - CPUs = "5" - NestedHV = "true" - RAM = "24576" - cpu_cores = "5" - datacenter = "${var.vcenter_datacenter}" - datastore = "${var.esxi_datastore}" - folder = "${var.output_folder}" - host = "${var.cluster_or_esxi_host}" - insecure_connection = true - password = "${var.vcenter_password}" - shutdown_timeout = "15m" - ssh_password = "${var.vm_password}" - ssh_username = "${var.vm_username}" - template = "${var.baseimage_name}" - username = "${var.vcenter_username}" - vcenter_server = "${var.vcenter_server}" - vm_name = "${var.build_id}" -} - -build { - sources = ["source.vsphere-clone.template"] - - provisioner "shell" { - inline = ["mkdir ${local.image_folder}"] - } - - provisioner "file" { - destination = "${local.image_folder}/" - sources = [ - "${path.root}/../assets/xamarin-selector", - "${path.root}/../scripts/tests", - "${path.root}/../scripts/docs-gen", - "${path.root}/../scripts/helpers" - ] - } - - provisioner "file" { - destination = "${local.image_folder}/docs-gen/" - source = "${path.root}/../../../helpers/software-report-base" - } - - provisioner "file" { - destination = "${local.image_folder}/add-certificate.swift" - source = "${path.root}/../assets/add-certificate.swift" - } - - provisioner "file" { - destination = "~/.bashrc" - source = "${path.root}/../assets/bashrc" - } - - provisioner "file" { - destination = "~/.bash_profile" - source = "${path.root}/../assets/bashprofile" - } - - provisioner "shell" { - inline = [ "mkdir ~/bootstrap" ] - } - - provisioner "file" { - destination = "~/bootstrap" - source = "${path.root}/../assets/bootstrap-provisioner/" - } - - provisioner "file" { - destination = "${local.image_folder}/toolset.json" - source = "${path.root}/../toolsets/toolset-12.json" - } - - provisioner "shell" { - execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - inline = [ - "mv ${local.image_folder}/docs-gen ${local.image_folder}/software-report", - "mv ${local.image_folder}/xamarin-selector ${local.image_folder}/assets", - "mkdir ~/utils", - "mv ${local.image_folder}/helpers/confirm-identified-developers.scpt ~/utils", - "mv ${local.image_folder}/helpers/invoke-tests.sh ~/utils", - "mv ${local.image_folder}/helpers/utils.sh ~/utils", - "mv ${local.image_folder}/helpers/xamarin-utils.sh ~/utils" - ] - } - - provisioner "shell" { - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/install-xcode-clt.sh", - "${path.root}/../scripts/build/install-homebrew.sh" - ] - } - - provisioner "shell" { - environment_vars = ["PASSWORD=${var.vm_password}", "USERNAME=${var.vm_username}"] - execute_command = "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/configure-network-interface-detection.sh", - "${path.root}/../scripts/build/configure-autologin.sh", - "${path.root}/../scripts/build/configure-auto-updates.sh", - "${path.root}/../scripts/build/configure-screensaver.sh", - "${path.root}/../scripts/build/configure-ntpconf.sh", - "${path.root}/../scripts/build/configure-max-files-limitation.sh", - "${path.root}/../scripts/build/configure-shell.sh" - ] - } - - provisioner "shell" { - environment_vars = ["IMAGE_VERSION=${var.build_id}", "IMAGE_OS=${var.image_os}", "PASSWORD=${var.vm_password}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/configure-preimagedata.sh", - "${path.root}/../scripts/build/configure-ssh.sh", - "${path.root}/../scripts/build/configure-machine.sh" - ] - } - - provisioner "shell" { - execute_command = "sudo {{ .Vars }} {{ .Path }}" - expect_disconnect = true - inline = ["echo 'Reboot VM'", "shutdown -r now"] - } - - provisioner "shell" { - environment_vars = ["API_PAT=${var.github_api_pat}", "USER_PASSWORD=${var.vm_password}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - pause_before = "30s" - scripts = [ - "${path.root}/../scripts/build/configure-windows.sh", - "${path.root}/../scripts/build/install-powershell.sh", - "${path.root}/../scripts/build/install-dotnet.sh", - "${path.root}/../scripts/build/install-python.sh", - "${path.root}/../scripts/build/install-azcopy.sh", - "${path.root}/../scripts/build/install-openssl.sh", - "${path.root}/../scripts/build/install-ruby.sh", - "${path.root}/../scripts/build/install-rubygems.sh", - "${path.root}/../scripts/build/install-git.sh", - "${path.root}/../scripts/build/install-mongodb.sh", - "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" - ] - } - - provisioner "shell" { - environment_vars = ["XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_SAS=${var.xcode_install_sas}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" - script = "${path.root}/../scripts/build/Install-Xcode.ps1" - } - - provisioner "shell" { - execute_command = "sudo {{ .Vars }} {{ .Path }}" - expect_disconnect = true - inline = ["echo 'Reboot VM'", "shutdown -r now"] - } - - provisioner "shell" { - environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/install-actions-cache.sh", - "${path.root}/../scripts/build/install-llvm.sh", - "${path.root}/../scripts/build/install-golang.sh", - "${path.root}/../scripts/build/install-swiftlint.sh", - "${path.root}/../scripts/build/install-openjdk.sh", - "${path.root}/../scripts/build/install-php.sh", - "${path.root}/../scripts/build/install-aws-tools.sh", - "${path.root}/../scripts/build/install-rust.sh", - "${path.root}/../scripts/build/install-gcc.sh", - "${path.root}/../scripts/build/install-haskell.sh", - "${path.root}/../scripts/build/install-cocoapods.sh", - "${path.root}/../scripts/build/install-android-sdk.sh", - "${path.root}/../scripts/build/install-xamarin.sh", - "${path.root}/../scripts/build/install-visualstudio.sh", - "${path.root}/../scripts/build/install-nvm.sh", - "${path.root}/../scripts/build/install-apache.sh", - "${path.root}/../scripts/build/install-nginx.sh", - "${path.root}/../scripts/build/install-postgresql.sh", - "${path.root}/../scripts/build/install-audiodevice.sh", - "${path.root}/../scripts/build/install-vcpkg.sh", - "${path.root}/../scripts/build/install-miniconda.sh", - "${path.root}/../scripts/build/install-safari.sh", - "${path.root}/../scripts/build/install-chrome.sh", - "${path.root}/../scripts/build/install-edge.sh", - "${path.root}/../scripts/build/install-firefox.sh", - "${path.root}/../scripts/build/install-pypy.sh", - "${path.root}/../scripts/build/install-pipx-packages.sh", - "${path.root}/../scripts/build/install-bicep.sh", - "${path.root}/../scripts/build/install-codeql-bundle.sh" - ] - } - - provisioner "shell" { - environment_vars = ["IMAGE_FOLDER=${local.image_folder}"] - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/Install-Toolset.ps1", - "${path.root}/../scripts/build/Configure-Toolset.ps1" - ] - } - - provisioner "shell" { - execute_command = "ruby {{ .Path }}" - script = "${path.root}/../scripts/build/configure-xcode-simulators.rb" - } - - provisioner "shell" { - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" - script = "${path.root}/../scripts/build/Update-XcodeSimulators.ps1" - } - - provisioner "shell" { - environment_vars = ["IMAGE_FOLDER=${local.image_folder}"] - inline = [ - "pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}", - "pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\"" - ] - } - - provisioner "file" { - destination = "${path.root}/../../image-output/" - direction = "download" - source = "${local.image_folder}/output/*" - } - - provisioner "shell" { - execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" - scripts = [ - "${path.root}/../scripts/build/configure-hostname.sh", - "${path.root}/../scripts/build/configure-system.sh" - ] - } -} diff --git a/images/macos/toolsets/Readme.md b/images/macos/toolsets/Readme.md index 1ac8e98c1205..7eb63cabc05c 100644 --- a/images/macos/toolsets/Readme.md +++ b/images/macos/toolsets/Readme.md @@ -6,6 +6,8 @@ - `link` property points to the place where Xcode will be located on image. `/Applications/Xcode_.app` - `version` points to Xcode version that will be downloaded and installed - `symlinks` describes the list of aliases where symlinks will be created to + - `install_runtimes` is boolean function to control over the related simulator runtimes + - `sha256` used to check integrity of the Xcode installer file - `default` - version of Xcode to set as default (should be metched with any `link` in `versions` property) **Example:** `"11.2"` @@ -22,8 +24,8 @@ ```json "versions": [ - { "link": "12.2", "version": "12.2.0" }, - { "link": "11.7", "version": "11.7.0", "symlinks": ["11.7_beta"] } + { "link": "16_beta_4", "version": "16.0.0-Beta.4+16A5211f", "symlinks": ["16.0"], "install_runtimes": "false", "sha256": "4270cd8021b2f7f512ce91bfc4423b25bccab36cdab21834709d798c8daade72"}, + { "link": "15.4", "version": "15.4.0+15F31d", "install_runtimes": "true", "sha256": "82d3d61804ff3f4c7c82085e91dc701037ddaa770e542848b2477e22f4e8aa7a"} ] ``` diff --git a/images/macos/toolsets/toolset-11.json b/images/macos/toolsets/toolset-11.json deleted file mode 100644 index cf26c25ea907..000000000000 --- a/images/macos/toolsets/toolset-11.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "xcode": { - "default": "13.2.1", - "x64": { - "versions": [ - { "link": "13.2.1", "version": "13.2.1+13C100", "symlinks": ["13.2"], "sha256": "D3BFCC6225D531587490C0DFC0926C80B7D50D17671DC8F25868F965F5D65F9D" }, - { "link": "13.1", "version": "13.1.0+13A1030d", "sha256": "4EFDEEA0EEEDA1957BB394128CCCD1DAAC3CB0A3D074224E0FAB90855CCA09C4" }, - { "link": "13.0", "version": "13.0.0+13A233", "sha256": "1D8257750A4E0333A2B372B32381BE5EC9B29704C8A0D44CE2E6D26D1CF4301E" }, - { "link": "12.5.1", "version": "12.5.1+12E507", "symlinks": ["12.5"], "sha256": "2592BF58E654440B3DF7062219DBBD24BDF345FAE6BA000756D6D5B1166A7168" }, - { "link": "12.4", "version": "12.4.0+12D4e", "sha256": "CC8D10155258F9DDAA5E422AB8F50E6058758C95208E58E59B5DB1DB033CE2FF" }, - { "link": "11.7", "version": "11.7.0-GM+11E801a", "symlinks": ["11.7_beta"], "sha256": "A53FDEAB92326CD9BF93A1B5FAE01E3D658B04DA60DFF5DE74141CABA0808B03" } - ] - } - }, - "xamarin": { - "vsmac": { - "default": "2022", - "versions": [ "2019", "2022" ] - }, - "mono_versions": [ - "6.12.0.188" - ], - "ios_versions": [ - "15.8.0.3", "15.6.0.3", "15.4.0.0", "15.2.0.17", "15.0.0.6", "14.20.0.24", "14.16.0.5", "14.14.2.5", "14.10.0.4", "14.8.0.3", "14.6.0.15", "14.4.1.3", "14.2.0.12", "14.0.0.0", "13.20.2.2" - ], - "mac_versions": [ - "8.8.0.3", "8.6.0.3", "8.4.0.0", "8.2.0.17", "7.14.0.27", "7.10.0.5", "7.8.2.5", "7.4.0.10", "7.2.0.3", "7.0.0.15", "6.22.1.26", "6.20.2.2" - ], - "android_versions": [ - "12.2.8.3", "12.1.0.2", "12.0.0.3", "11.3.0.4", "11.2.2.1", "11.1.0.26", "11.0.2.0" - ], - "bundle_default": "6_12_12", - "bundles": [ - { - "symlink": "6_12_16", - "mono":"6.12", - "ios": "15.8", - "mac": "8.8", - "android": "12.2" - }, - { - "symlink": "6_12_15", - "mono":"6.12", - "ios": "15.8", - "mac": "8.8", - "android": "12.1" - }, - { - "symlink": "6_12_14", - "mono":"6.12", - "ios": "15.8", - "mac": "8.8", - "android": "12.0" - }, - { - "symlink": "6_12_13", - "mono":"6.12", - "ios": "15.6", - "mac": "8.6", - "android": "12.0" - }, - { - "symlink": "6_12_12", - "mono":"6.12", - "ios": "15.4", - "mac": "8.4", - "android": "12.0" - }, - { - "symlink": "6_12_11", - "mono":"6.12", - "ios": "15.2", - "mac": "8.2", - "android": "12.0" - }, - { - "symlink": "6_12_10", - "mono":"6.12", - "ios": "15.0", - "mac": "7.14", - "android": "11.3" - }, - { - "symlink": "6_12_9", - "mono":"6.12", - "ios": "14.20", - "mac": "7.14", - "android": "11.3" - }, - { - "symlink": "6_12_8", - "mono":"6.12", - "ios": "14.16", - "mac": "7.10", - "android": "11.2" - }, - { - "symlink": "6_12_7", - "mono":"6.12", - "ios": "14.14", - "mac": "7.8", - "android": "11.2" - }, - { - "symlink": "6_12_6", - "mono":"6.12", - "ios": "14.10", - "mac": "7.4", - "android": "11.1" - }, - { - "symlink": "6_12_5", - "mono":"6.12", - "ios": "14.8", - "mac": "7.2", - "android": "11.1" - }, - { - "symlink": "6_12_4", - "mono":"6.12", - "ios": "14.6", - "mac": "7.0", - "android": "11.1" - }, - { - "symlink": "6_12_3", - "mono":"6.12", - "ios": "14.4", - "mac": "6.22", - "android": "11.1" - }, - { - "symlink": "6_12_2", - "mono":"6.12", - "ios": "14.2", - "mac": "6.20", - "android": "11.0" - }, - { - "symlink": "6_12_1", - "mono":"6.12", - "ios": "14.0", - "mac": "6.20", - "android": "11.0" - }, - { - "symlink": "6_12_0", - "mono":"6.12", - "ios": "13.20", - "mac": "6.20", - "android": "11.0" - } - ] - }, - "java": { - "x64": { - "default": "8", - "versions": [ "8", "11", "17", "21"] - } - }, - "android": { - "cmdline-tools": "commandlinetools-mac-9123335_latest.zip", - "platform_min_version": "31", - "build_tools_min_version": "31.0.0", - "extras": [ - "android;m2repository", "google;m2repository", "google;google_play_services" - ], - "addons": [], - "additional_tools": [ - "cmake;3.10.2.4988404", - "cmake;3.18.1", - "cmake;3.22.1" - ], - "ndk": { - "default": "25", - "versions": [ - "24", "25", "26" - ] - } - }, - "powershellModules": [ - {"name": "Az"}, - {"name": "MarkdownPS"}, - {"name": "Pester"}, - {"name": "PSScriptAnalyzer"} - ], - "npm": { - "global_packages": [ - { "name": "appcenter-cli", "test": "appcenter --version" }, - { "name": "newman", "test": "newman --version" } - ] - }, - "brew": { - "common_packages": [ - "aliyun-cli", - "ant", - "aria2", - "bazelisk", - "carthage", - "cmake", - "colima", - "gh", - "gnupg", - "gnu-tar", - "helm", - "kotlin", - "libpq", - "p7zip", - "packer", - "perl", - "pkg-config", - "sbt", - "subversion", - "swiftformat", - "swig", - "zstd", - "zlib", - "libxext", - "libxft", - "tcl-tk" - ], - "cask_packages": [ - "julia" - ] - }, - "gcc": { - "versions": [ - "10", - "11", - "12" - ] - }, - "toolcache": [ - { - "name": "Python", - "url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json", - "platform" : "darwin", - "arch": { - "x64": { - "versions": [ - "3.7.*", - "3.8.*", - "3.9.*", - "3.10.*", - "3.11.*", - "3.12.*" - ] - } - } - }, - { - "name": "PyPy", - "platform" : "darwin", - "arch": { - "x64": { - "versions": [ - "2.7", - "3.7", - "3.8", - "3.9", - "3.10" - ] - } - } - }, - { - "name": "Node", - "url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json", - "platform" : "darwin", - "arch": { - "x64": { - "versions": [ - "16.*", - "18.*", - "20.*" - ] - } - } - }, - { - "name": "Go", - "url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json", - "platform" : "darwin", - "arch": { - "x64": { - "variable_template" : "GOROOT_{0}_{1}_X64", - "versions": [ - "1.20.*", - "1.21.*" - ] - } - } - }, - { - "name": "Ruby", - "arch": { - "x64": { - "versions": [ - "3.0.*", - "3.1.*" - ] - } - } - } - ], - "pipx": [ - { - "package": "yamllint", - "cmd": "yamllint --version" - } - ], - "dotnet": { - "arch":{ - "x64": { - "versions": [ - "6.0", - "7.0", - "8.0" - ] - } - } - }, - "ruby": { - "default": "3.0", - "rubygems": [ - "xcode-install", - "cocoapods", - "nomad-cli", - "xcpretty", - "bundler", - "fastlane", - "jazzy" - ] - }, - "go": { - "default": "1.21" - }, - "node": { - "default": "18", - "nvm_versions": [ - "16", - "18", - "20" - ] - }, - "llvm": { - "version": "15" - }, - "mongodb": { - "version": "5.0" - }, - "postgresql": { - "version": "14" - }, - "pwsh": { - "version": "7.4" - } -} diff --git a/images/macos/toolsets/toolset-12.json b/images/macos/toolsets/toolset-12.json index 336e1a617155..08e1158d2483 100644 --- a/images/macos/toolsets/toolset-12.json +++ b/images/macos/toolsets/toolset-12.json @@ -226,7 +226,6 @@ }, "gcc": { "versions": [ - "11", "12", "13", "14" diff --git a/images/macos/toolsets/toolset-13.json b/images/macos/toolsets/toolset-13.json index b0fe5fa41213..23a98ef1ed7c 100644 --- a/images/macos/toolsets/toolset-13.json +++ b/images/macos/toolsets/toolset-13.json @@ -9,7 +9,6 @@ { "link": "14.3.1", "version": "14.3.1+14E300c","symlinks": ["14.3"], "install_runtimes": "true", "sha256": "B5CC7BF37447C32A971B37D71C7DA1AF7ABB45CEE4B96FE126A1D3B0D2C260AF"}, { "link": "14.2", "version": "14.2.0+14C18", "install_runtimes": "true", "sha256": "686B9D53CA49E50D563BC0104B1E8B4F7CCFE80064A6D689965FB819BF8EFE72"}, { "link": "14.1", "version": "14.1.0+14B47b", "install_runtimes": "true", "sha256": "12F8A3AEF78BF354470AD8B351ADDD925C8EDAD888137D138CA50A8130EB9F2F"} - ] }, "arm64":{ @@ -88,7 +87,6 @@ }, "gcc": { "versions": [ - "11", "12", "13", "14" diff --git a/images/macos/toolsets/toolset-14.json b/images/macos/toolsets/toolset-14.json index 53dd36b60e23..364d19d0104f 100644 --- a/images/macos/toolsets/toolset-14.json +++ b/images/macos/toolsets/toolset-14.json @@ -90,7 +90,6 @@ }, "gcc": { "versions": [ - "11", "12", "13", "14" diff --git a/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 b/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 index 0249831f48f8..e194051ed1ed 100644 --- a/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 +++ b/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 @@ -5,6 +5,6 @@ Install-Binary -Type MSI ` -Url "https://aka.ms/cosmosdb-emulator" ` - -ExpectedSHA256Sum "34D8E1968A868CEBBC31D1484C473FC61D3174D6C3B9AB71D4CE94F6618D7670" + -ExpectedSHA256Sum "D21A0476B7F3439319BE6A1060935E7C865FEFA87C47943C9A6D595137703F49" Invoke-PesterTests -TestFile "Tools" -TestName "Azure Cosmos DB Emulator" diff --git a/images/windows/toolsets/toolset-2019.json b/images/windows/toolsets/toolset-2019.json index 118a6b71a632..7ab1534a0fd3 100644 --- a/images/windows/toolsets/toolset-2019.json +++ b/images/windows/toolsets/toolset-2019.json @@ -138,11 +138,7 @@ "extras": [ "android;m2repository", "google;m2repository", - "google;google_play_services", - "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2", - "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1", - "m2repository;com;android;support;constraint;constraint-layout;1.0.2", - "m2repository;com;android;support;constraint;constraint-layout;1.0.1" + "google;google_play_services" ], "addons": [ "addon-google_apis-google-24",