Merge pull request #12443 from aibaars/codeql-bundle-per-platform
CodeQL: install platform specific CodeQL bundle
This commit is contained in:
@@ -30,7 +30,7 @@ bundle_tag_name="codeql-bundle-v$bundle_version"
|
|||||||
echo "Downloading CodeQL bundle $bundle_version..."
|
echo "Downloading CodeQL bundle $bundle_version..."
|
||||||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
||||||
# different operating systems within containers.
|
# different operating systems within containers.
|
||||||
archive_path=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz")
|
archive_path=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle-osx64.tar.gz")
|
||||||
|
|
||||||
codeql_toolcache_path=$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64
|
codeql_toolcache_path=$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64
|
||||||
mkdir -p "$codeql_toolcache_path"
|
mkdir -p "$codeql_toolcache_path"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ bundle_tag_name="codeql-bundle-v$bundle_version"
|
|||||||
echo "Downloading CodeQL bundle $bundle_version..."
|
echo "Downloading CodeQL bundle $bundle_version..."
|
||||||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
||||||
# different operating systems within containers.
|
# different operating systems within containers.
|
||||||
codeql_archive=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz")
|
codeql_archive=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle-linux64.tar.gz")
|
||||||
|
|
||||||
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
|
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
|
||||||
mkdir -p "$codeql_toolcache_path"
|
mkdir -p "$codeql_toolcache_path"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ $tagName = "codeql-bundle-v" + $cliVersion
|
|||||||
Write-Host "Downloading CodeQL bundle $($cliVersion)..."
|
Write-Host "Downloading CodeQL bundle $($cliVersion)..."
|
||||||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
|
||||||
# different operating systems within containers.
|
# different operating systems within containers.
|
||||||
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle.tar.gz"
|
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle-win64.tar.gz"
|
||||||
$downloadDirectoryPath = (Get-Item $codeQLBundlePath).Directory.FullName
|
$downloadDirectoryPath = (Get-Item $codeQLBundlePath).Directory.FullName
|
||||||
|
|
||||||
$codeQLToolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath $cliVersion | Join-Path -ChildPath "x64"
|
$codeQLToolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath $cliVersion | Join-Path -ChildPath "x64"
|
||||||
@@ -39,7 +39,7 @@ New-Item -Path $codeQLToolcachePath -ItemType Directory -Force | Out-Null
|
|||||||
|
|
||||||
Write-Host "Unpacking the downloaded CodeQL bundle archive..."
|
Write-Host "Unpacking the downloaded CodeQL bundle archive..."
|
||||||
Expand-7ZipArchive -Path $codeQLBundlePath -DestinationPath $downloadDirectoryPath
|
Expand-7ZipArchive -Path $codeQLBundlePath -DestinationPath $downloadDirectoryPath
|
||||||
$unGzipedCodeQLBundlePath = Join-Path $downloadDirectoryPath "codeql-bundle.tar"
|
$unGzipedCodeQLBundlePath = Join-Path $downloadDirectoryPath "codeql-bundle-win64.tar"
|
||||||
Expand-7ZipArchive -Path $unGzipedCodeQLBundlePath -DestinationPath $codeQLToolcachePath
|
Expand-7ZipArchive -Path $unGzipedCodeQLBundlePath -DestinationPath $codeQLToolcachePath
|
||||||
|
|
||||||
Write-Host "CodeQL bundle at $($codeQLToolcachePath) contains the following directories:"
|
Write-Host "CodeQL bundle at $($codeQLToolcachePath) contains the following directories:"
|
||||||
|
|||||||
Reference in New Issue
Block a user