mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 11:37:00 +00:00
[Ubuntu] Adding Bicep CLI (#3639)
* Add Bicep CLI to Ubuntu images * Use helper download_with_retries * remove bicep from deprecated 16.04 image * formatting Co-authored-by: Marcus Felling <MarcusFelling@microsoft.com>
This commit is contained in:
@@ -109,6 +109,7 @@ $toolsList = @(
|
||||
(Get-AzCopyVersion),
|
||||
(Get-BazelVersion),
|
||||
(Get-BazeliskVersion),
|
||||
(Get-BicepVersion),
|
||||
(Get-CodeQLBundleVersion),
|
||||
(Get-CMakeVersion),
|
||||
(Get-DockerMobyClientVersion),
|
||||
|
||||
@@ -26,6 +26,12 @@ function Get-BazeliskVersion {
|
||||
return "Bazelisk $bazeliskVersion"
|
||||
}
|
||||
|
||||
function Get-BicepVersion {
|
||||
(bicep --version | Out-String) -match "bicep cli version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||
$bicepVersion = $Matches.Version
|
||||
return "Bicep $bicepVersion"
|
||||
}
|
||||
|
||||
function Get-CodeQLBundleVersion {
|
||||
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
|
||||
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
|
||||
|
||||
16
images/linux/scripts/installers/bicep.sh
Normal file
16
images/linux/scripts/installers/bicep.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: bicep.sh
|
||||
## Desc: Installs bicep cli
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install Bicep CLI
|
||||
download_with_retries "https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64" "." "bicep.bin"
|
||||
# Mark it as executable
|
||||
chmod +x ./bicep.bin
|
||||
# Add bicep to PATH (requires admin)
|
||||
sudo mv ./bicep.bin /usr/local/bin/bicep
|
||||
|
||||
invoke_tests "Tools" "Bicep"
|
||||
@@ -8,6 +8,12 @@ Describe "azcopy" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Bicep" {
|
||||
It "Bicep" {
|
||||
"bicep --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Rust" {
|
||||
It "Rustup is installed" {
|
||||
"rustup --version" | Should -ReturnZeroExitCode
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/azure-devops-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/basic.sh",
|
||||
"{{template_dir}}/scripts/installers/bicep.sh",
|
||||
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/apache.sh",
|
||||
"{{template_dir}}/scripts/installers/aws.sh",
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/azure-devops-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/basic.sh",
|
||||
"{{template_dir}}/scripts/installers/bicep.sh",
|
||||
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/apache.sh",
|
||||
"{{template_dir}}/scripts/installers/aws.sh",
|
||||
|
||||
Reference in New Issue
Block a user