mirror of
https://github.com/actions/runner-images.git
synced 2026-01-07 02:28:54 +08:00
Merge remote-tracking branch 'upstream/main' into v-danurg/vsmac_latest_implementation
This commit is contained in:
@@ -77,6 +77,7 @@ $toolsList = @(
|
|||||||
(Get-AzCopy10Version),
|
(Get-AzCopy10Version),
|
||||||
(Get-BazelVersion),
|
(Get-BazelVersion),
|
||||||
(Get-BazeliskVersion),
|
(Get-BazeliskVersion),
|
||||||
|
(Get-CodeQLBundleVersion),
|
||||||
(Get-CMakeVersion),
|
(Get-CMakeVersion),
|
||||||
(Get-CurlVersion),
|
(Get-CurlVersion),
|
||||||
(Get-DockerMobyVersion),
|
(Get-DockerMobyVersion),
|
||||||
@@ -102,6 +103,9 @@ $toolsList = @(
|
|||||||
(Get-NvmVersion),
|
(Get-NvmVersion),
|
||||||
(Get-PackerVersion),
|
(Get-PackerVersion),
|
||||||
(Get-PhantomJSVersion),
|
(Get-PhantomJSVersion),
|
||||||
|
(Get-PulumiVersion),
|
||||||
|
(Get-RVersion),
|
||||||
|
(Get-SphinxVersion),
|
||||||
(Get-SwigVersion),
|
(Get-SwigVersion),
|
||||||
(Get-TerraformVersion),
|
(Get-TerraformVersion),
|
||||||
(Get-UnZipVersion),
|
(Get-UnZipVersion),
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ function Get-BazeliskVersion {
|
|||||||
return "Bazelisk $bazeliskVersion"
|
return "Bazelisk $bazeliskVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-CodeQLBundleVersion {
|
||||||
|
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
|
||||||
|
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
|
||||||
|
$CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
|
||||||
|
$CodeQLVersion = & $CodeQLPath version --quiet
|
||||||
|
return "CodeQL Action Bundle $CodeQLVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-PodManVersion {
|
function Get-PodManVersion {
|
||||||
$podmanVersion = podman --version | Take-OutputPart -Part 2
|
$podmanVersion = podman --version | Take-OutputPart -Part 2
|
||||||
return "Podman $podmanVersion"
|
return "Podman $podmanVersion"
|
||||||
@@ -247,3 +255,18 @@ function Get-ORASCliVersion {
|
|||||||
function Get-VerselCliversion {
|
function Get-VerselCliversion {
|
||||||
return "$(vercel --version 2>&1 | Select-Object -First 1)"
|
return "$(vercel --version 2>&1 | Select-Object -First 1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-PulumiVersion {
|
||||||
|
$pulumiVersion = pulumi version | Take-OutputPart -Part 0 -Delimiter "v"
|
||||||
|
return "Pulumi $pulumiVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-RVersion {
|
||||||
|
$rVersion = (Get-CommandResult "R --version | grep 'R version'").Output | Take-OutputPart -Part 2
|
||||||
|
return "R $rVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-SphinxVersion {
|
||||||
|
$sphinxVersion = searchd -h | Select-Object -First 1 | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-"
|
||||||
|
return "Sphinx Open Source Search Server $sphinxVersion"
|
||||||
|
}
|
||||||
28
images/linux/scripts/installers/codeql-bundle.sh
Normal file
28
images/linux/scripts/installers/codeql-bundle.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
## File: codeql-bundle.sh
|
||||||
|
## Desc: Install the CodeQL CLI Bundle to the toolcache.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
|
# Retrieve the name of the CodeQL bundle preferred by the Action (in the format codeql-bundle-YYYYMMDD).
|
||||||
|
codeql_bundle_name="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/main/src/defaults.json | jq -r .bundleVersion)"
|
||||||
|
# Convert the bundle name to a version number (0.0.0-YYYYMMDD).
|
||||||
|
codeql_bundle_version="0.0.0-${codeql_bundle_name##*-}"
|
||||||
|
|
||||||
|
extraction_directory="$AGENT_TOOLSDIRECTORY/CodeQL/$codeql_bundle_version/x64"
|
||||||
|
mkdir -p "$extraction_directory"
|
||||||
|
|
||||||
|
echo "Downloading CodeQL bundle $codeql_bundle_version..."
|
||||||
|
download_with_retries "https://github.com/github/codeql-action/releases/download/$codeql_bundle_name/codeql-bundle.tar.gz" "/tmp" "codeql-bundle.tar.gz"
|
||||||
|
tar -xzf "/tmp/codeql-bundle.tar.gz" -C "$extraction_directory"
|
||||||
|
|
||||||
|
# Touch a special file that indicates to the CodeQL Action that this bundle was baked-in to the hosted runner images.
|
||||||
|
touch "$extraction_directory/pinned-version"
|
||||||
|
|
||||||
|
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
|
||||||
|
touch "$extraction_directory.complete"
|
||||||
|
|
||||||
|
# Test that the tool has been extracted successfully.
|
||||||
|
"$AGENT_TOOLSDIRECTORY/CodeQL/$codeql_bundle_version/x64/codeql/codeql" version
|
||||||
@@ -150,6 +150,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/clang.sh",
|
"{{template_dir}}/scripts/installers/clang.sh",
|
||||||
"{{template_dir}}/scripts/installers/swift.sh",
|
"{{template_dir}}/scripts/installers/swift.sh",
|
||||||
"{{template_dir}}/scripts/installers/cmake.sh",
|
"{{template_dir}}/scripts/installers/cmake.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/codeql-bundle.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
||||||
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
|
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
|
||||||
|
|||||||
@@ -152,6 +152,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/clang.sh",
|
"{{template_dir}}/scripts/installers/clang.sh",
|
||||||
"{{template_dir}}/scripts/installers/swift.sh",
|
"{{template_dir}}/scripts/installers/swift.sh",
|
||||||
"{{template_dir}}/scripts/installers/cmake.sh",
|
"{{template_dir}}/scripts/installers/cmake.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/codeql-bundle.sh",
|
||||||
"{{template_dir}}/scripts/installers/containers.sh",
|
"{{template_dir}}/scripts/installers/containers.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
||||||
|
|||||||
@@ -154,6 +154,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/clang.sh",
|
"{{template_dir}}/scripts/installers/clang.sh",
|
||||||
"{{template_dir}}/scripts/installers/swift.sh",
|
"{{template_dir}}/scripts/installers/swift.sh",
|
||||||
"{{template_dir}}/scripts/installers/cmake.sh",
|
"{{template_dir}}/scripts/installers/cmake.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/codeql-bundle.sh",
|
||||||
"{{template_dir}}/scripts/installers/containers.sh",
|
"{{template_dir}}/scripts/installers/containers.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
||||||
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
"{{template_dir}}/scripts/installers/docker-moby.sh",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"6.12.0.93", "6.10.0.106", "6.8.0.123", "6.6.0.166", "6.4.0.208"
|
"6.12.0.93", "6.10.0.106", "6.8.0.123", "6.6.0.166", "6.4.0.208"
|
||||||
],
|
],
|
||||||
"ios-versions": [
|
"ios-versions": [
|
||||||
"13.20.2.2", "13.18.2.1", "13.16.0.13", "13.14.1.39", "13.10.0.21", "13.8.3.0", "13.6.0.12", "13.4.0.2", "13.2.0.47"
|
"14.0.0.0", "13.20.2.2", "13.18.2.1", "13.16.0.13", "13.14.1.39", "13.10.0.21", "13.8.3.0", "13.6.0.12", "13.4.0.2", "13.2.0.47"
|
||||||
],
|
],
|
||||||
"mac-versions": [
|
"mac-versions": [
|
||||||
"6.20.2.2", "6.18.3.2", "6.16.0.13", "6.14.1.39", "6.10.0.21", "6.8.3.0", "6.6.0.12", "6.4.0.2", "6.2.0.47"
|
"6.20.2.2", "6.18.3.2", "6.16.0.13", "6.14.1.39", "6.10.0.21", "6.8.3.0", "6.6.0.12", "6.4.0.2", "6.2.0.47"
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
],
|
],
|
||||||
"bundle-default": "latest",
|
"bundle-default": "latest",
|
||||||
"bundles": [
|
"bundles": [
|
||||||
|
{
|
||||||
|
"symlink": "6_12_1",
|
||||||
|
"mono":"6.12",
|
||||||
|
"ios": "14.0",
|
||||||
|
"mac": "6.20",
|
||||||
|
"android": "11.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"symlink": "6_12_0",
|
"symlink": "6_12_0",
|
||||||
"mono":"6.12",
|
"mono":"6.12",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"6.12.0.93"
|
"6.12.0.93"
|
||||||
],
|
],
|
||||||
"ios-versions": [
|
"ios-versions": [
|
||||||
"13.20.2.2"
|
"14.0.0.0", "13.20.2.2"
|
||||||
],
|
],
|
||||||
"mac-versions": [
|
"mac-versions": [
|
||||||
"6.20.2.2"
|
"6.20.2.2"
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
],
|
],
|
||||||
"bundle-default": "latest",
|
"bundle-default": "latest",
|
||||||
"bundles": [
|
"bundles": [
|
||||||
|
{
|
||||||
|
"symlink": "6_12_1",
|
||||||
|
"mono":"6.12",
|
||||||
|
"ios": "14.0",
|
||||||
|
"mac": "6.20",
|
||||||
|
"android": "11.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"symlink": "6_12_0",
|
"symlink": "6_12_0",
|
||||||
"mono":"6.12",
|
"mono":"6.12",
|
||||||
|
|||||||
@@ -320,7 +320,8 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-KubernetesCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-KubernetesCli.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Kind.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Kind.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -318,7 +318,8 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-RootCA.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-RootCA.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
28
images/win/scripts/Installers/Install-CodeQLBundle.ps1
Normal file
28
images/win/scripts/Installers/Install-CodeQLBundle.ps1
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-CodeQLBundle.ps1
|
||||||
|
## Desc: Install the CodeQL CLI Bundle to the toolcache.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Retrieve the name of the CodeQL bundle preferred by the Action (in the format codeql-bundle-YYYYMMDD).
|
||||||
|
$CodeQLBundleName = (Invoke-RestMethod "https://raw.githubusercontent.com/github/codeql-action/main/src/defaults.json").bundleVersion
|
||||||
|
# Convert the bundle name to a version number (0.0.0-YYYYMMDD).
|
||||||
|
$CodeQLBundleVersion = "0.0.0-" + $CodeQLBundleName.split("-")[-1]
|
||||||
|
|
||||||
|
$ExtractionDirectory = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath $CodeQLBundleVersion | Join-Path -ChildPath "x64"
|
||||||
|
New-Item -Path $ExtractionDirectory -ItemType Directory -Force | Out-Null
|
||||||
|
|
||||||
|
Write-Host "Downloading CodeQL bundle $CodeQLBundleVersion..."
|
||||||
|
$CodeQLBundlePath = Start-DownloadWithRetry -Url "https://github.com/github/codeql-action/releases/download/$CodeQLBundleName/codeql-bundle.tar.gz" -Name "codeql-bundle.tar.gz"
|
||||||
|
$DownloadDirectoryPath = (Get-Item $CodeQLBundlePath).Directory.FullName
|
||||||
|
Extract-7Zip -Path $CodeQLBundlePath -DestinationPath $DownloadDirectoryPath
|
||||||
|
$UnGzipedCodeQLBundlePath = Join-Path $DownloadDirectoryPath "codeql-bundle.tar"
|
||||||
|
Extract-7Zip -Path $UnGzipedCodeQLBundlePath -DestinationPath $ExtractionDirectory
|
||||||
|
|
||||||
|
# Touch a special file that indicates to the CodeQL Action that this bundle was baked-in to the hosted runner images.
|
||||||
|
New-Item -ItemType file (Join-Path $ExtractionDirectory -ChildPath "pinned-version")
|
||||||
|
|
||||||
|
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
|
||||||
|
New-Item -ItemType file "$ExtractionDirectory.complete"
|
||||||
|
|
||||||
|
# Test that the tool has been extracted successfully.
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "CodeQLBundle"
|
||||||
@@ -77,6 +77,7 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
(Get-BazelVersion),
|
(Get-BazelVersion),
|
||||||
(Get-BazeliskVersion),
|
(Get-BazeliskVersion),
|
||||||
(Get-CMakeVersion),
|
(Get-CMakeVersion),
|
||||||
|
(Get-CodeQLBundleVersion),
|
||||||
(Get-RVersion),
|
(Get-RVersion),
|
||||||
(Get-DockerVersion),
|
(Get-DockerVersion),
|
||||||
(Get-DockerComposeVersion),
|
(Get-DockerComposeVersion),
|
||||||
|
|||||||
@@ -30,6 +30,14 @@ function Get-CMakeVersion {
|
|||||||
return "CMake $cmakeVersion"
|
return "CMake $cmakeVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-CodeQLBundleVersion {
|
||||||
|
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
|
||||||
|
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
|
||||||
|
$CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
|
||||||
|
$CodeQLVersion = $($CodeQLPath version --quiet)
|
||||||
|
return "CodeQL Action Bundle $CodeQLVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-DockerVersion {
|
function Get-DockerVersion {
|
||||||
$dockerVersion = $(docker version --format "{{.Server.Version}}")
|
$dockerVersion = $(docker version --format "{{.Server.Version}}")
|
||||||
return "Docker $dockerVersion"
|
return "Docker $dockerVersion"
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ Describe "CMake" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "CodeQLBundle" {
|
||||||
|
It "CodeQLBundle" {
|
||||||
|
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
|
||||||
|
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
|
||||||
|
$CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
|
||||||
|
"$CodeQLPath version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Describe "R" {
|
Describe "R" {
|
||||||
It "Rscript" {
|
It "Rscript" {
|
||||||
"Rscript --version" | Should -ReturnZeroExitCode
|
"Rscript --version" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
Reference in New Issue
Block a user