From 91a4c7b52597db8912c9d070bb007e8cbb922878 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 16 Oct 2020 10:49:38 +0300 Subject: [PATCH 01/10] Update rubygem.sh --- images/macos/provision/core/rubygem.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/macos/provision/core/rubygem.sh b/images/macos/provision/core/rubygem.sh index 83639e47..872436f8 100755 --- a/images/macos/provision/core/rubygem.sh +++ b/images/macos/provision/core/rubygem.sh @@ -4,6 +4,14 @@ source ~/utils/utils.sh echo Updating RubyGems... gem update --system + +# Freeze xcodeproj 1.18.0 because version 1.19.0 contains breaking changes related to CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER flag +# Related issues: +# - https://github.com/CocoaPods/CocoaPods/issues/10153 +# - https://github.com/actions/virtual-environments/issues/1804 +# Need to revisit when Cocoapods 1.10.0 is released and added to VM +gem install xcodeproj -v 1.18.0 + echo Installing xcode-install utility... gem install xcode-install --force From 6423cb0f32a88dc59e0103445ecd4ce89d0d0f6a Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 16 Oct 2020 12:30:42 +0300 Subject: [PATCH 02/10] Update image-generation.yml --- images.CI/macos/azure-pipelines/image-generation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images.CI/macos/azure-pipelines/image-generation.yml b/images.CI/macos/azure-pipelines/image-generation.yml index 37b17b8a..3a60edc6 100644 --- a/images.CI/macos/azure-pipelines/image-generation.yml +++ b/images.CI/macos/azure-pipelines/image-generation.yml @@ -11,6 +11,10 @@ jobs: value: $(Build.BuildNumber).$(System.JobAttempt) steps: + - bash: | + Write-Host "##vso[build.updatebuildnumber]${{ variables.VirtualMachineName }}" + displayName: Update BuildNumber + - checkout: self clean: true fetchDepth: 1 From 7f7c287c04f20c4e96e6be12fd5ac1b29e8288d1 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 16 Oct 2020 12:42:54 +0300 Subject: [PATCH 03/10] Update image-generation.yml --- images.CI/macos/azure-pipelines/image-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images.CI/macos/azure-pipelines/image-generation.yml b/images.CI/macos/azure-pipelines/image-generation.yml index 3a60edc6..f38d2fdc 100644 --- a/images.CI/macos/azure-pipelines/image-generation.yml +++ b/images.CI/macos/azure-pipelines/image-generation.yml @@ -12,7 +12,7 @@ jobs: steps: - bash: | - Write-Host "##vso[build.updatebuildnumber]${{ variables.VirtualMachineName }}" + echo "##vso[build.updatebuildnumber]${{ variables.VirtualMachineName }}" displayName: Update BuildNumber - checkout: self From a58d9b403599367e0a26deffba3ccc189adf6137 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Fri, 16 Oct 2020 15:19:57 +0300 Subject: [PATCH 04/10] add test for pip3 path --- images/macos/tests/Python.Tests.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/macos/tests/Python.Tests.ps1 b/images/macos/tests/Python.Tests.ps1 index 76cd8941..62460999 100644 --- a/images/macos/tests/Python.Tests.ps1 +++ b/images/macos/tests/Python.Tests.ps1 @@ -31,4 +31,10 @@ Describe "Python" { It "Pip 3 is available" { "pip3 --version" | Should -ReturnZeroExitCode } + + It "Pip 3 and Python 3 came from the same brew formula" { + $pip3Path = Split-Path (readlink (which pip3)) + $python3Path = Split-Path (readlink (which python3)) + $pip3Path | Should -BeExactly $python3Path + } } \ No newline at end of file From 9a268303fb52da116da5f7a6bb0e56f12486edde Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 16 Oct 2020 15:38:06 +0300 Subject: [PATCH 05/10] fix gradle version --- .../linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 14d4a18e..1989caf4 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -144,17 +144,17 @@ function Get-AntVersion { } function Get-GradleVersion { - $result = gradle -v | Out-String - $result -match "Gradle (?\d+\.\d+\.\d+)" | Out-Null - $gradleVersion = $Matches.version + $gradleVersion = (gradle -v) -match "^Gradle \d" | Take-OutputPart -Part 1 return "Gradle $gradleVersion" } + function Get-MavenVersion { $result = mvn -version | Out-String $result -match "Apache Maven (?\d+\.\d+\.\d+)" | Out-Null $mavenVersion = $Matches.version return "Maven $mavenVersion" } + function Get-SbtVersion { $result = Get-CommandResult "sbt -version" $result.Output -match "sbt script version: (?\d+\.\d+\.\d+)" | Out-Null From 0fa2247a898625b8020d8dfb1dc4a54ddb2b256c Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Sat, 17 Oct 2020 22:37:30 +0300 Subject: [PATCH 06/10] change installation to package [macOS] (#1830) --- images/macos/provision/core/aws.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/images/macos/provision/core/aws.sh b/images/macos/provision/core/aws.sh index 9e0063be..4d98d512 100644 --- a/images/macos/provision/core/aws.sh +++ b/images/macos/provision/core/aws.sh @@ -1,7 +1,9 @@ #!/bin/bash echo Installing aws... -brew install awscli +curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" +sudo installer -pkg AWSCLIV2.pkg -target / +rm -rf AWSCLIV2.pkg echo Installing aws sam cli... brew tap aws/tap From 1d84a5ea799a50451bfc0742a5ef60cc43c62af8 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Sun, 18 Oct 2020 20:07:40 +0300 Subject: [PATCH 07/10] fix test to work with haskell revisions --- images/win/scripts/Tests/Haskell.Tests.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Tests/Haskell.Tests.ps1 b/images/win/scripts/Tests/Haskell.Tests.ps1 index b6ebb763..53a0bf6c 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -3,12 +3,14 @@ Describe "Haskell" { [array]$ghcVersionList = Get-ChildItem -Path $chocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") } $ghcCount = $ghcVersionList.Count $defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} | Select-Object -Last 1 + $defaultGhcShortVersion = ([version]$defaultGhcVersion).ToString(3) $ghcTestCases = $ghcVersionList | ForEach-Object { $ghcVersion = $_ + $ghcShortVersion = ([version]$ghcVersion).ToString(3) @{ - ghcVersion = $ghcVersion - binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcVersion\bin\ghc.exe" + ghcVersion = $ghcShortVersion + binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe" } } @@ -20,7 +22,7 @@ Describe "Haskell" { "$binGhcPath --version" | Should -MatchCommandOutput $ghcVersion } - It "GHC is the default version and should be the latest installed" -TestCases @{defaultGhcVersion = $defaultGhcVersion} { + It "GHC is the default version and should be the latest installed" -TestCases @{defaultGhcVersion = $defaultGhcShortVersion} { "ghc --version" | Should -MatchCommandOutput $defaultGhcVersion } From 57a08bac71edeea90bfa48d6496782dfafb41f78 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Sun, 18 Oct 2020 20:52:32 +0300 Subject: [PATCH 08/10] add correct path to install haskell --- images/win/scripts/Installers/Install-Haskell.ps1 | 3 ++- images/win/scripts/Tests/Haskell.Tests.ps1 | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Haskell.ps1 b/images/win/scripts/Installers/Install-Haskell.ps1 index 50c0c6d4..18b256a3 100644 --- a/images/win/scripts/Installers/Install-Haskell.ps1 +++ b/images/win/scripts/Installers/Install-Haskell.ps1 @@ -17,7 +17,8 @@ ForEach ($version in $VersionsList) # Add default version of GHC to path, because choco formula updates path on user level $DefaultGhcVersion = $VersionsList | Select-Object -Last 1 -$DefaultGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$DefaultGhcVersion\tools\ghc-$DefaultGhcVersion\bin" +$DefaultGhcShortVersion = ([version]$DefaultGhcVersion).ToString(3) +$DefaultGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$DefaultGhcVersion\tools\ghc-$DefaultGhcShortVersion\bin" Add-MachinePathItem -PathItem $DefaultGhcPath Write-Host "Installing cabal..." diff --git a/images/win/scripts/Tests/Haskell.Tests.ps1 b/images/win/scripts/Tests/Haskell.Tests.ps1 index 53a0bf6c..38a558de 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -9,7 +9,8 @@ Describe "Haskell" { $ghcVersion = $_ $ghcShortVersion = ([version]$ghcVersion).ToString(3) @{ - ghcVersion = $ghcShortVersion + ghcVersion = $ghcVersion + ghcShortVersion = $ghcShortVersion binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe" } } @@ -19,11 +20,11 @@ Describe "Haskell" { } It "GHC is installed" -TestCases $ghcTestCases { - "$binGhcPath --version" | Should -MatchCommandOutput $ghcVersion + "$binGhcPath --version" | Should -MatchCommandOutput $ghcShortVersion } - It "GHC is the default version and should be the latest installed" -TestCases @{defaultGhcVersion = $defaultGhcShortVersion} { - "ghc --version" | Should -MatchCommandOutput $defaultGhcVersion + It "GHC is the default version and should be the latest installed" -TestCases @{defaultGhcShortVersion = $defaultGhcShortVersion} { + "ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion } It "Cabal is installed" { From 12d5315961c319a62310c32694d3a196cec88a74 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Sun, 18 Oct 2020 21:14:39 +0300 Subject: [PATCH 09/10] add ghcdefault cases --- images/win/scripts/Tests/Haskell.Tests.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Tests/Haskell.Tests.ps1 b/images/win/scripts/Tests/Haskell.Tests.ps1 index 38a558de..1576c83c 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -3,7 +3,10 @@ Describe "Haskell" { [array]$ghcVersionList = Get-ChildItem -Path $chocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") } $ghcCount = $ghcVersionList.Count $defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} | Select-Object -Last 1 - $defaultGhcShortVersion = ([version]$defaultGhcVersion).ToString(3) + $ghcDefaultCases = @{ + defaultGhcVersion = $defaultGhcVersion + defaultGhcShortVersion = ([version]$defaultGhcVersion).ToString(3) + } $ghcTestCases = $ghcVersionList | ForEach-Object { $ghcVersion = $_ @@ -23,7 +26,7 @@ Describe "Haskell" { "$binGhcPath --version" | Should -MatchCommandOutput $ghcShortVersion } - It "GHC is the default version and should be the latest installed" -TestCases @{defaultGhcShortVersion = $defaultGhcShortVersion} { + It "GHC is the default version and should be the latest installed" -TestCases @ghcDefaultCases { "ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion } From a9b5e805215a31c76b522bfce9f4307308c85326 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Sun, 18 Oct 2020 21:45:48 +0300 Subject: [PATCH 10/10] Fix testcase name --- images/win/scripts/Tests/Haskell.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Haskell.Tests.ps1 b/images/win/scripts/Tests/Haskell.Tests.ps1 index 1576c83c..826dc16d 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -26,7 +26,7 @@ Describe "Haskell" { "$binGhcPath --version" | Should -MatchCommandOutput $ghcShortVersion } - It "GHC is the default version and should be the latest installed" -TestCases @ghcDefaultCases { + It "GHC is the default version and should be the latest installed" -TestCases $ghcDefaultCases { "ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion }