diff --git a/images.CI/macos/azure-pipelines/image-generation.yml b/images.CI/macos/azure-pipelines/image-generation.yml index 37b17b8a0..f38d2fdcb 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: | + echo "##vso[build.updatebuildnumber]${{ variables.VirtualMachineName }}" + displayName: Update BuildNumber + - checkout: self clean: true fetchDepth: 1 diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 14d4a18e6..1989caf4b 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 diff --git a/images/macos/provision/core/aws.sh b/images/macos/provision/core/aws.sh index 9e0063be1..4d98d5122 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 diff --git a/images/macos/provision/core/rubygem.sh b/images/macos/provision/core/rubygem.sh index 83639e472..872436f88 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 diff --git a/images/macos/tests/Python.Tests.ps1 b/images/macos/tests/Python.Tests.ps1 index 43dc122ab..7a50a7ab8 100644 --- a/images/macos/tests/Python.Tests.ps1 +++ b/images/macos/tests/Python.Tests.ps1 @@ -35,4 +35,10 @@ Describe "Python" { It "Pipx is available" { "pipx --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 diff --git a/images/win/scripts/Installers/Install-Haskell.ps1 b/images/win/scripts/Installers/Install-Haskell.ps1 index 50c0c6d4a..18b256a3b 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 b6ebb7630..826dc16d8 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -3,12 +3,18 @@ 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 + $ghcDefaultCases = @{ + defaultGhcVersion = $defaultGhcVersion + 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" + ghcShortVersion = $ghcShortVersion + binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe" } } @@ -17,11 +23,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 = $defaultGhcVersion} { - "ghc --version" | Should -MatchCommandOutput $defaultGhcVersion + It "GHC is the default version and should be the latest installed" -TestCases $ghcDefaultCases { + "ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion } It "Cabal is installed" {