diff --git a/images/macos/provision/core/bicep.sh b/images/macos/provision/core/bicep.sh new file mode 100644 index 000000000..a2e7b5849 --- /dev/null +++ b/images/macos/provision/core/bicep.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e -o pipefail + +echo Installing bicep cli... +brew tap azure/bicep +brew install bicep + +invoke_tests "Common" "Bicep" diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index f94ef3865..e85a47ec5 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -502,6 +502,11 @@ function Get-SwigVersion { return "Swig $swigVersion" } +function Get-BicepVersion { + $bicepVersion = Run-Command "bicep --version" | Take-Part -Part 3 + return "Bicep CLI $bicepVersion" +} + function Build-PackageManagementEnvironmentTable { return @( @{ diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index b2eca6c39..13252fb3d 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -167,7 +167,8 @@ $toolsList = @( (Get-AWSSessionManagerCLIVersion), (Get-AliyunCLIVersion), (Get-XcodeCommandLineToolsVersion), - (Get-SwigVersion) + (Get-SwigVersion), + (Get-BicepVersion) ) if( -not $os.IsHighSierra) { diff --git a/images/macos/templates/macOS-10.14.json b/images/macos/templates/macOS-10.14.json index 35c04d76d..a0fd28278 100644 --- a/images/macos/templates/macOS-10.14.json +++ b/images/macos/templates/macOS-10.14.json @@ -183,7 +183,8 @@ "./provision/core/xcode-sims.sh", "./provision/core/xcode-postbuild.sh", "./provision/core/pypy.sh", - "./provision/core/pipx-packages.sh" + "./provision/core/pipx-packages.sh", + "./provision/core/bicep.sh" ] }, { diff --git a/images/macos/templates/macOS-10.15.json b/images/macos/templates/macOS-10.15.json index 92b2f36c6..eeb578d1e 100644 --- a/images/macos/templates/macOS-10.15.json +++ b/images/macos/templates/macOS-10.15.json @@ -186,7 +186,8 @@ "./provision/core/firefox.sh", "./provision/core/xcode-postbuild.sh", "./provision/core/pypy.sh", - "./provision/core/pipx-packages.sh" + "./provision/core/pipx-packages.sh", + "./provision/core/bicep.sh" ] }, { diff --git a/images/macos/templates/macOS-11.json b/images/macos/templates/macOS-11.json index f8661baa1..cf8bcbc98 100644 --- a/images/macos/templates/macOS-11.json +++ b/images/macos/templates/macOS-11.json @@ -189,7 +189,8 @@ "./provision/core/edge.sh", "./provision/core/firefox.sh", "./provision/core/pypy.sh", - "./provision/core/pipx-packages.sh" + "./provision/core/pipx-packages.sh", + "./provision/core/bicep.sh" ] }, { diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index 79f47bb36..0c2366a1b 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -92,3 +92,9 @@ Describe "Swig" { "swig -version" | Should -ReturnZeroExitCode } } + +Describe "Bicep" { + It "Bicep" { + "bicep --version" | Should -ReturnZeroExitCode + } +} \ No newline at end of file