diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index b8e2b8ed1..5abbb4b59 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -66,7 +66,6 @@ for version in $php_versions; do if [[ $version == "5.6" || $version == "7.0" || $version == "7.1" ]]; then apt-fast install -y --no-install-recommends php$version-mcrypt php$version-recode - apt-get remove --purge -yq php$version-dev fi if [[ $version == "7.2" || $version == "7.3" ]]; then @@ -81,13 +80,12 @@ apt-fast install -y --no-install-recommends \ php-memcache \ php-memcached \ php-mongodb \ + php-pear \ php-redis \ php-xdebug \ php-yaml \ php-zmq -apt-get remove --purge -yq php7.2-dev - apt-fast install -y --no-install-recommends snmp # Install composer @@ -113,17 +111,23 @@ mv phpunit /usr/local/bin/phpunit # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" -for cmd in php $php_versions composer phpunit; do - if [[ $cmd =~ ^[0-9] ]]; then - cmd="php$cmd" - fi - +for cmd in composer pear pecl phpunit; do if ! command -v $cmd; then echo "$cmd was not installed" exit 1 fi done +for version in $php_versions; do + if ! command -v php$version; then + echo "php$version was not installed" + exit 1 + elif ! command -v php-config$version || ! command -v phpize$version; then + echo "php$version-dev was not installed" + exit 1 + fi +done + # ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php # see https://github.com/actions/virtual-environments/issues/1084 if isUbuntu20 ; then diff --git a/images/macos/helpers/Common.Helpers.psm1 b/images/macos/helpers/Common.Helpers.psm1 index 174ea0504..1c14ab3a6 100644 --- a/images/macos/helpers/Common.Helpers.psm1 +++ b/images/macos/helpers/Common.Helpers.psm1 @@ -95,4 +95,49 @@ function Invoke-ExpressionWithValidation { throw "Command '$Command' has finished with exit code $LASTEXITCODE" } return $output +} + +function Start-DownloadWithRetry +{ + Param + ( + [Parameter(Mandatory)] + [string] $Url, + [string] $Name, + [string] $DownloadPath = "${env:Temp}", + [int] $Retries = 20 + ) + + if ([String]::IsNullOrEmpty($Name)) { + $Name = [IO.Path]::GetFileName($Url) + } + + $filePath = Join-Path -Path $DownloadPath -ChildPath $Name + + #Default retry logic for the package. + while ($Retries -gt 0) + { + try + { + Write-Host "Downloading package from: $Url to path $filePath ." + (New-Object System.Net.WebClient).DownloadFile($Url, $filePath) + break + } + catch + { + Write-Host "There is an error during package downloading:`n $_" + $Retries-- + + if ($Retries -eq 0) + { + Write-Host "File can't be downloaded. Please try later or check that file exists by url: $Url" + exit 1 + } + + Write-Host "Waiting 30 seconds before retrying. Retries left: $Retries" + Start-Sleep -Seconds 30 + } + } + + return $filePath } \ No newline at end of file diff --git a/images/macos/macos-10.13-Readme.md b/images/macos/macos-10.13-Readme.md index da35d0f76..b2fc73174 100644 --- a/images/macos/macos-10.13-Readme.md +++ b/images/macos/macos-10.13-Readme.md @@ -1,42 +1,44 @@ | Announcements | |-| +| [Default Node.JS will be switched to 14.x on all platforms ](https://github.com/actions/virtual-environments/issues/1953) | +| [[macOS] Default Python will be upgraded to 3.9](https://github.com/actions/virtual-environments/issues/1929) | +| [.NET 5.0 will become a default .NET version the week of November 16, 2020](https://github.com/actions/virtual-environments/issues/1891) | | [macOS 11.0 (Big Sur) is available as a preview 🚀](https://github.com/actions/virtual-environments/issues/1814) | -| [[macOS] Default Ruby version will be changed to 2.7 on October, 26](https://github.com/actions/virtual-environments/issues/1775) | -| [Default Xcode will be changed to Xcode 12.0 on October, 20](https://github.com/actions/virtual-environments/issues/1712) | | [Xcode 11.0, 11.1, 11.4.0 will be deprecated on November, 5](https://github.com/actions/virtual-environments/issues/1688) | *** # macOS 10.13 info - System Version: macOS 10.13.6 (17G14033) - Kernel Version: Darwin 17.7.0 -- Image Version: 20201015.3 +- Image Version: 20201107.1 ## Installed Software ### Language and Runtime - R 4.0.3 - Node.js v8.17.0 -- NVM 0.36.0 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.1 v12.19.0 v13.14.0 v14.14.0 +- NVM 0.37.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.23.0 v12.19.0 v13.14.0 v14.15.0 - Python 2.7.17 - Python 3.8.6 -- Ruby 2.6.6p146 +- Ruby 2.7.2p137 - .NET SDK 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 -- Go 1.15.2 -- PHP 7.4.11 +- Go 1.15.3 +- PHP 7.4.12 - julia 1.5.2 ### Package Management - Pip 19.3.1 (python 2.7) -- Pip 20.2.3 (python 3.8) +- Pip 20.2.4 (python 3.8) +- Pipx 0.15.6.0 - Bundler version 2.1.4 - Carthage 0.36.0 -- CocoaPods 1.9.3 -- Homebrew 2.5.6 +- CocoaPods 1.10.0 +- Homebrew 2.5.8 - NPM 3.10.10 - Yarn 1.22.5 - NuGet 4.7.0.5148 - Miniconda 4.8.3 - RubyGems 3.1.4 -- Composer 1.10.15 +- Composer 2.0.6 ### Project Management - Apache Maven 3.6.3 @@ -45,59 +47,59 @@ ### Utilities - Curl 7.73.0 -- Git: 2.28.0 -- Git LFS: 2.12.0 -- GitHub CLI: 1.1.0 +- Git: 2.29.2 +- Git LFS: 2.12.1 +- GitHub CLI: 1.2.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.14.0 -- Packer 1.6.4 +- Packer 1.6.5 - OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl@1.0.2t/1.0.2t)` - jq 1.6 - gpg (GnuPG) 2.2.23 - psql (PostgreSQL) 13.0 - PostgreSQL 13.0 - aria2 1.35.0 -- azcopy 10.6.0 +- azcopy 10.7.0 - zstd 1.4.5 -- bazel 3.6.0 -- bazelisk 1.7.2 -- helm v3.3.4+ga61ce56 +- bazel 3.7.0 +- bazelisk 1.7.4 +- helm v3.4.0+g7090a89 - mongo v4.4.1 - mongod v4.4.1 - 7-Zip 16.02 -- virtualbox 6.1.14r140239 +- virtualbox 6.1.16r140961 - Vagrant 2.2.10 -- GNU parallel 20200722 +- GNU parallel 20201022 ### Tools -- Fastlane 2.163.0 +- Fastlane 2.166.0 - Cmake 3.18.4 - App Center CLI 1.2.2 -- Azure CLI 2.13.0 -- AWS CLI 2.0.56 -- AWS SAM CLI 1.6.2 -- AWS Session Manager CLI 1.1.61.0 +- Azure CLI 2.14.1 +- AWS CLI 2.0.62 +- AWS SAM CLI 1.8.0 +- AWS Session Manager CLI 1.2.7.0 - Aliyun CLI 3.0.60 ### Linters - yamllint 1.25.0 ### Browsers - Safari 13.1.2 (13609.3.5.1.5) - SafariDriver 13.1.2 (13609.3.5.1.5) -- Google Chrome 86.0.4240.80 +- Google Chrome 86.0.4240.183 - ChromeDriver 86.0.4240.22 -- Microsoft Edge 85.0.564.70 -- MSEdgeDriver 85.0.564.70 -- Mozilla Firefox 81.0.2 +- Microsoft Edge 86.0.622.63 +- MSEdgeDriver 86.0.622.63 +- Mozilla Firefox 82.0.2 - geckodriver 0.27.0 ### Java | Version | Vendor | Environment Variable | | --------- | ------------ | -------------------- | -| 1.7.0_272 | Zulu | JAVA_HOME_7_X64 | -| 1.8.0_265 | AdoptOpenJDK | JAVA_HOME_8_X64 | -| 11.0.8 | AdoptOpenJDK | JAVA_HOME_11_X64 | +| 1.7.0_282 | Zulu | JAVA_HOME_7_X64 | +| 1.8.0_272 | AdoptOpenJDK | JAVA_HOME_8_X64 | +| 11.0.9 | AdoptOpenJDK | JAVA_HOME_11_X64 | | 12.0.2 | AdoptOpenJDK | JAVA_HOME_12_X64 | | 13.0.2 | AdoptOpenJDK | JAVA_HOME_13_X64 | | 14.0.2 | AdoptOpenJDK | JAVA_HOME_14_X64 | @@ -222,7 +224,7 @@ #### Xcode Support Tools - xcpretty 0.3.0 -- xcversion 2.6.6 +- xcversion 2.6.7 - Nomad CLI 3.1.4 - Nomad CLI IPA ipa 0.14.3 - xctool 0.3.7 @@ -339,7 +341,7 @@ | Android SDK Tools | 26.1.1 | | Android SDK Platforms | android-30 (rev 3)
android-29 (rev 5)
android-28 (rev 6)
android-27 (rev 3)
android-26 (rev 2)
android-25 (rev 3)
android-24 (rev 2)
android-23 (rev 3)
android-22 (rev 2)
android-21 (rev 2)
android-20 (rev 2)
android-19 (rev 4)
android-18 (rev 3)
android-17 (rev 3)
android-16 (rev 5)
android-15 (rev 5) | | Android SDK Build-tools | 30.0.0 30.0.1 30.0.2
29.0.0 29.0.1 29.0.2 29.0.3
28.0.0 28.0.1 28.0.2 28.0.3
27.0.0 27.0.1 27.0.2 27.0.3
26.0.0 26.0.1 26.0.2 26.0.3
25.0.0 25.0.1 25.0.2 25.0.3
24.0.0 24.0.1 24.0.2 24.0.3
23.0.1 23.0.2 23.0.3 23.0.0
22.0.1 22.0.0
21.1.2 21.0.0 21.0.1 21.0.2 21.1.0 21.1.1
20.0.0
19.1.0 19.0.0 19.0.1 19.0.2 19.0.3
18.0.1 18.1.0 18.1.1
17.0.0 | -| Android SDK Platform-Tools | 30.0.4 | +| Android SDK Platform-Tools | 30.0.5 | | Google APIs | addon-google_apis-google-21
addon-google_apis-google-22
addon-google_apis-google-23
addon-google_apis-google-24 | | Android Support Repository | 47.0.0 | | Google Play services | 49 | diff --git a/images/macos/macos-10.14-Readme.md b/images/macos/macos-10.14-Readme.md index e8fa2cac5..34999f6f9 100644 --- a/images/macos/macos-10.14-Readme.md +++ b/images/macos/macos-10.14-Readme.md @@ -1,47 +1,49 @@ | Announcements | |-| +| [Default Node.JS will be switched to 14.x on all platforms ](https://github.com/actions/virtual-environments/issues/1953) | +| [[macOS] Default Python will be upgraded to 3.9](https://github.com/actions/virtual-environments/issues/1929) | +| [.NET 5.0 will become a default .NET version the week of November 16, 2020](https://github.com/actions/virtual-environments/issues/1891) | | [macOS 11.0 (Big Sur) is available as a preview 🚀](https://github.com/actions/virtual-environments/issues/1814) | -| [[macOS] Default Ruby version will be changed to 2.7 on October, 26](https://github.com/actions/virtual-environments/issues/1775) | -| [Default Xcode will be changed to Xcode 12.0 on October, 20](https://github.com/actions/virtual-environments/issues/1712) | | [Xcode 11.0, 11.1, 11.4.0 will be deprecated on November, 5](https://github.com/actions/virtual-environments/issues/1688) | *** # macOS 10.14 info - System Version: macOS 10.14.6 (18G6032) - Kernel Version: Darwin 18.7.0 -- Image Version: 20201018.1 +- Image Version: 20201106.2 ## Installed Software ### Language and Runtime -- Clang/LLVM 10.0.1 +- Clang/LLVM 11.0.0 - gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 - available by `gcc-8` alias - gcc-9 (Homebrew GCC 9.3.0) 9.3.0 - available by `gcc-9` alias - GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0 - available by `gfortran-8` alias - GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 - available by `gfortran-9` alias - R 4.0.3 - Node.js v8.17.0 -- NVM 0.36.0 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.1 v12.19.0 v13.14.0 v14.14.0 +- NVM 0.37.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.23.0 v12.19.0 v13.14.0 v14.15.0 - Python 2.7.17 - Python 3.8.6 -- Ruby 2.6.6p146 +- Ruby 2.7.2p137 - .NET SDK 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 - Go 1.15.3 -- PHP 7.4.11 +- PHP 7.4.12 - julia 1.5.2 ### Package Management - Pip 19.3.1 (python 2.7) -- Pip 20.2.3 (python 3.8) +- Pip 20.2.4 (python 3.8) +- Pipx 0.15.6.0 - Bundler version 2.1.4 - Carthage 0.36.0 -- CocoaPods 1.9.3 -- Homebrew 2.5.6 +- CocoaPods 1.10.0 +- Homebrew 2.5.8 - NPM 3.10.10 - Yarn 1.22.5 - NuGet 4.7.0.5148 - Miniconda 4.8.3 - RubyGems 3.1.4 -- Composer 1.10.15 +- Composer 2.0.5 ### Project Management - Apache Maven 3.6.3 @@ -50,40 +52,40 @@ ### Utilities - Curl 7.73.0 -- Git: 2.28.0 -- Git LFS: 2.12.0 -- GitHub CLI: 1.1.0 +- Git: 2.29.2 +- Git LFS: 2.12.1 +- GitHub CLI: 1.2.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.14.0 -- Packer 1.6.4 +- Packer 1.6.5 - OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl@1.0.2t/1.0.2t)` - jq 1.6 - gpg (GnuPG) 2.2.23 - psql (PostgreSQL) 13.0 - PostgreSQL 13.0 - aria2 1.35.0 -- azcopy 10.6.0 +- azcopy 10.7.0 - zstd 1.4.5 -- bazel 3.6.0 -- bazelisk 1.7.2 -- helm v3.3.4+ga61ce56 +- bazel 3.7.0 +- bazelisk 1.7.4 +- helm v3.4.0+g7090a89 - mongo v4.4.1 - mongod v4.4.1 - 7-Zip 16.02 -- virtualbox 6.1.14r140239 +- virtualbox 6.1.16r140961 - Vagrant 2.2.10 -- GNU parallel 20200722 +- GNU parallel 20201022 ### Tools -- Fastlane 2.163.0 +- Fastlane 2.166.0 - Cmake 3.18.4 - App Center CLI 1.2.2 -- Azure CLI 2.13.0 -- AWS CLI 2.0.57 -- AWS SAM CLI 1.6.2 -- AWS Session Manager CLI 1.1.61.0 +- Azure CLI 2.14.1 +- AWS CLI 2.0.62 +- AWS SAM CLI 1.8.0 +- AWS Session Manager CLI 1.2.7.0 - Aliyun CLI 3.0.60 - GHCup v0.1.11 - GHC 8.10.2 @@ -95,21 +97,21 @@ - SwiftLint 0.40.3 ### Browsers -- Safari 14.0 (14610.1.28.1.9) -- SafariDriver 14.0 (14610.1.28.1.9) -- Google Chrome 86.0.4240.80 +- Safari 14.0 (14610.1.28.1.10) +- SafariDriver 14.0 (14610.1.28.1.10) +- Google Chrome 86.0.4240.183 - ChromeDriver 86.0.4240.22 -- Microsoft Edge 85.0.564.70 -- MSEdgeDriver 85.0.564.70 -- Mozilla Firefox 81.0.2 +- Microsoft Edge 86.0.622.63 +- MSEdgeDriver 86.0.622.63 +- Mozilla Firefox 82.0.2 - geckodriver 0.27.0 ### Java | Version | Vendor | Environment Variable | | --------- | ------------ | -------------------- | -| 1.7.0_272 | Zulu | JAVA_HOME_7_X64 | -| 1.8.0_265 | AdoptOpenJDK | JAVA_HOME_8_X64 | -| 11.0.8 | AdoptOpenJDK | JAVA_HOME_11_X64 | +| 1.7.0_282 | Zulu | JAVA_HOME_7_X64 | +| 1.8.0_272 | AdoptOpenJDK | JAVA_HOME_8_X64 | +| 11.0.9 | AdoptOpenJDK | JAVA_HOME_11_X64 | | 12.0.2 | AdoptOpenJDK | JAVA_HOME_12_X64 | | 13.0.2 | AdoptOpenJDK | JAVA_HOME_13_X64 | | 14.0.2 | AdoptOpenJDK | JAVA_HOME_14_X64 | @@ -118,7 +120,7 @@ - 2.4.10 - 2.5.8 - 2.6.6 -- 2.7.1 +- 2.7.2 #### Python - 2.7.18 @@ -134,16 +136,16 @@ #### Node.js - 8.17.0 -- 10.22.1 +- 10.23.0 - 12.19.0 -- 14.14.0 +- 14.15.0 #### Go - 1.11.13 - 1.12.17 - 1.13.15 -- 1.14.10 -- 1.15.3 +- 1.14.11 +- 1.15.4 ### Rust Tools - Rust 1.47.0 @@ -152,8 +154,8 @@ #### Packages - Bindgen 0.55.1 - Cbindgen 0.15.0 -- Cargo-outdated v0.9.11 -- Cargo-audit 0.12.1 +- Cargo-outdated v0.9.13 +- Cargo-audit 0.13.1 ### PowerShell Tools - PowerShell 7.0.3 @@ -267,7 +269,7 @@ #### Xcode Support Tools - xcpretty 0.3.0 -- xcversion 2.6.6 +- xcversion 2.6.7 - Nomad CLI 3.1.4 - Nomad CLI IPA ipa 0.14.3 - xctool 0.3.7 @@ -367,7 +369,7 @@ | Android SDK Tools | 26.1.1 | | Android SDK Platforms | android-30 (rev 3)
android-29 (rev 5)
android-28 (rev 6)
android-27 (rev 3)
android-26 (rev 2)
android-25 (rev 3)
android-24 (rev 2)
android-23 (rev 3)
android-22 (rev 2)
android-21 (rev 2)
android-20 (rev 2)
android-19 (rev 4)
android-18 (rev 3)
android-17 (rev 3)
android-16 (rev 5)
android-15 (rev 5) | | Android SDK Build-tools | 30.0.0 30.0.1 30.0.2
29.0.0 29.0.1 29.0.2 29.0.3
28.0.0 28.0.1 28.0.2 28.0.3
27.0.0 27.0.1 27.0.2 27.0.3
26.0.0 26.0.1 26.0.2 26.0.3
25.0.0 25.0.1 25.0.2 25.0.3
24.0.0 24.0.1 24.0.2 24.0.3
23.0.1 23.0.2 23.0.3 23.0.0
22.0.1 22.0.0
21.1.2 21.0.0 21.0.1 21.0.2 21.1.0 21.1.1
20.0.0
19.1.0 19.0.0 19.0.1 19.0.2 19.0.3
18.0.1 18.1.0 18.1.1
17.0.0 | -| Android SDK Platform-Tools | 30.0.4 | +| Android SDK Platform-Tools | 30.0.5 | | Google APIs | addon-google_apis-google-21
addon-google_apis-google-22
addon-google_apis-google-23
addon-google_apis-google-24 | | Android Support Repository | 47.0.0 | | Google Play services | 49 | diff --git a/images/macos/provision/configuration/finalize-vm.sh b/images/macos/provision/configuration/finalize-vm.sh index e3c4de7fc..67f1949c7 100644 --- a/images/macos/provision/configuration/finalize-vm.sh +++ b/images/macos/provision/configuration/finalize-vm.sh @@ -30,7 +30,7 @@ npm cache clean --force yarn cache clean # Clean up temporary directories -rm -rf ~/utils ~/image-generation +sudo rm -rf ~/utils ~/image-generation /tmp/* # Erase all indexes and wait until the rebuilding process ends, # for now there is no way to get status of indexing process, it takes around 3 minutes to accomplish diff --git a/images/macos/provision/core/aws.sh b/images/macos/provision/core/aws.sh index 02009449a..c1cb882b9 100644 --- a/images/macos/provision/core/aws.sh +++ b/images/macos/provision/core/aws.sh @@ -1,9 +1,11 @@ #!/bin/bash -e -o pipefail +source ~/utils/utils.sh + echo Installing aws... -curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" -sudo installer -pkg AWSCLIV2.pkg -target / -rm -rf AWSCLIV2.pkg +AWS_CLI_URL="https://awscli.amazonaws.com/AWSCLIV2.pkg" +download_with_retries $AWS_CLI_URL "/tmp" +sudo installer -pkg /tmp/AWSCLIV2.pkg -target / echo Installing aws sam cli... brew tap aws/tap diff --git a/images/macos/provision/core/azcopy.sh b/images/macos/provision/core/azcopy.sh index 5098c8789..bf6e05416 100755 --- a/images/macos/provision/core/azcopy.sh +++ b/images/macos/provision/core/azcopy.sh @@ -1,9 +1,11 @@ #!/bin/bash -e -o pipefail +source ~/utils/utils.sh + AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac" -wget -O "$HOME/azcopy.zip" "$AZCOPY_DOWNLOAD_URL" -unzip azcopy.zip -d azcopy +download_with_retries $AZCOPY_DOWNLOAD_URL "/tmp" "azcopy.zip" +unzip /tmp/azcopy.zip -d azcopy AZCOPY_EXTRACTED=$(echo azcopy/azcopy*) cp "$AZCOPY_EXTRACTED/azcopy" "/usr/local/bin/azcopy" chmod +x "/usr/local/bin/azcopy" diff --git a/images/macos/provision/core/node.sh b/images/macos/provision/core/node.sh index 194437a98..450001cdd 100644 --- a/images/macos/provision/core/node.sh +++ b/images/macos/provision/core/node.sh @@ -11,7 +11,7 @@ if is_Less_Catalina; then echo Installing the latest Node JS 8... TMP_FILE=/tmp/node-v8.17.0.pkg NODEURL=https://nodejs.org/dist/latest-v8.x/node-v8.17.0.pkg - curl "${NODEURL}" -o "${TMP_FILE}" + download_with_retries $NODEURL "/tmp" sudo installer -pkg "${TMP_FILE}" -target / rm -rf "${TMP_FILE}" sudo chown -R $USER "/usr/local/lib/node_modules" diff --git a/images/macos/provision/core/openjdk.sh b/images/macos/provision/core/openjdk.sh index afca628e8..7e1c4183a 100644 --- a/images/macos/provision/core/openjdk.sh +++ b/images/macos/provision/core/openjdk.sh @@ -7,7 +7,7 @@ installAzulJDK() { local TMP_FILE=/tmp/openjdk.dmg local TMP_MOUNT=`/usr/bin/mktemp -d /tmp/zulu.XXXX` # Download dmg - curl "${URL}" -o "${TMP_FILE}" + download_with_retries $URL "/tmp" "openjdk.dmg" # Attach dmg hdiutil attach "${TMP_FILE}" -mountpoint "${TMP_MOUNT}" # Install pkg diff --git a/images/macos/provision/core/pypy.sh b/images/macos/provision/core/pypy.sh index d55d785af..51f0f6ba1 100644 --- a/images/macos/provision/core/pypy.sh +++ b/images/macos/provision/core/pypy.sh @@ -3,6 +3,7 @@ ## File: pypy.sh ## Desc: Installs PyPy ################################################################################ + source ~/utils/utils.sh function InstallPyPy @@ -12,7 +13,7 @@ function InstallPyPy PACKAGE_TAR_NAME=$(echo $PACKAGE_URL | awk -F/ '{print $NF}') echo "Downloading tar archive '$PACKAGE_TAR_NAME' - '$PACKAGE_URL'" PACKAGE_TAR_TEMP_PATH="/tmp/$PACKAGE_TAR_NAME" - wget -q -O $PACKAGE_TAR_TEMP_PATH $PACKAGE_URL + download_with_retries $PACKAGE_URL "/tmp" "$PACKAGE_TAR_NAME" echo "Expand '$PACKAGE_TAR_NAME' to the /tmp folder" tar xf $PACKAGE_TAR_TEMP_PATH -C /tmp diff --git a/images/macos/provision/core/stack.sh b/images/macos/provision/core/stack.sh index 17c5ecd9a..a642d985c 100644 --- a/images/macos/provision/core/stack.sh +++ b/images/macos/provision/core/stack.sh @@ -1,5 +1,7 @@ #!/bin/bash -e -o pipefail +source ~/utils/utils.sh + echo "Get the latest Stack version..." StackRelease=$(curl -s "https://api.github.com/repos/commercialhaskell/stack/releases/latest") DownloadUrl=$(echo $StackRelease | jq -r '.assets[].browser_download_url | select(contains("osx-x86_64.tar.gz"))' | head -n 1) @@ -7,7 +9,7 @@ StackVersion=$(echo $StackRelease | jq -r '.name' | cut -c2-) StackArchive="/tmp/stack.tar.gz" echo "Download stack version $StackVersion..." -wget $DownloadUrl -O $StackArchive +download_with_retries $DownloadUrl "/tmp" "stack.tar.gz" StackToolcachePath="$AGENT_TOOLSDIRECTORY/stack/$StackVersion" DestinationPath="$StackToolcachePath/x64" diff --git a/images/macos/provision/core/toolset.ps1 b/images/macos/provision/core/toolset.ps1 index 9238b9ff4..8241f4ab5 100644 --- a/images/macos/provision/core/toolset.ps1 +++ b/images/macos/provision/core/toolset.ps1 @@ -23,7 +23,7 @@ Function Install-Asset { $assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..." - wget -P $assetFolderPath $ReleaseAsset.download_url --retry-connrefused --retry-on-http-error=429,500,503 --wait=30 --no-verbose + Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath Write-Host "Extract $($ReleaseAsset.filename) content..." tar -xzf $assetArchivePath -C $assetFolderPath diff --git a/images/macos/provision/utils/xamarin-utils.sh b/images/macos/provision/utils/xamarin-utils.sh index 1017cec24..a004fd761 100644 --- a/images/macos/provision/utils/xamarin-utils.sh +++ b/images/macos/provision/utils/xamarin-utils.sh @@ -1,5 +1,7 @@ #!/bin/bash -e -o pipefail +source ~/utils/utils.sh + # Xamarin can clean their SDKs while updating to newer versions, # so we should be able to detect it during image generation downloadAndInstallPKG() { @@ -175,7 +177,7 @@ downloadNUnitConsole() { pushd $TMPMOUNT sudo mkdir -p $NUNIT3_PATH - sudo curl -L -o nunit3.zip $NUNIT3_LOCATION + download_with_retries $NUNIT3_LOCATION "." "nunit3.zip" echo "Installing NUnit 3..." sudo unzip nunit3.zip -d $NUNIT3_PATH @@ -191,8 +193,12 @@ installNuget() { echo "Installing nuget $NUGET_VERSION for Mono $MONO_VERSION" cd ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget sudo mv nuget.exe nuget_old.exe - sudo curl -L -o nuget.exe $NUGET_URL + + pushd $TMPMOUNT + download_with_retries $NUGET_URL "." "nuget.exe" sudo chmod a+x nuget.exe + sudo mv nuget.exe ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget + popd } createUWPShim() { diff --git a/images/win/scripts/Installers/Install-PowershellCore.ps1 b/images/win/scripts/Installers/Install-PowershellCore.ps1 index 1e620c74b..f968ebf9c 100644 --- a/images/win/scripts/Installers/Install-PowershellCore.ps1 +++ b/images/win/scripts/Installers/Install-PowershellCore.ps1 @@ -5,4 +5,10 @@ Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet" +# about_update_notifications +# While the update check happens during the first session in a given 24-hour period, for performance reasons, +# the notification will only be shown on the start of subsequent sessions. +# Also for performance reasons, the check will not start until at least 3 seconds after the session begins. +[System.Environment]::SetEnvironmentVariable("POWERSHELL_UPDATECHECK", "Off", [System.EnvironmentVariableTarget]::Machine) + Invoke-PesterTests -TestFile "Tools" -TestName "PowerShell Core"