mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Merge remote-tracking branch 'upstream/main' into main
This commit is contained in:
10
images/win/scripts/Installers/Install-AzureDevSpacesCli.ps1
Normal file
10
images/win/scripts/Installers/Install-AzureDevSpacesCli.ps1
Normal file
@@ -0,0 +1,10 @@
|
||||
################################################################################
|
||||
## File: Install-AzureDevSpacesCLI.ps1
|
||||
## Desc: Install Azure Dev Spaces CLI
|
||||
################################################################################
|
||||
|
||||
# Install Azure Dev Spaces CLI
|
||||
Install-Binary -Url "https://aka.ms/get-azds-windows" -Name "Azure Dev Spaces CLI.exe" -ArgumentList ("/quiet")
|
||||
Add-MachinePathItem -PathItem "C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI"
|
||||
|
||||
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Azure Dev Spaces CLI"
|
||||
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"
|
||||
@@ -71,6 +71,7 @@ $ndkRoot = "C:\Program Files (x86)\Android\android-sdk\ndk-bundle"
|
||||
|
||||
if (Test-Path $ndkRoot) {
|
||||
setx ANDROID_HOME $sdkRoot /M
|
||||
setx ANDROID_SDK_ROOT $sdkRoot /M
|
||||
setx ANDROID_NDK_HOME $ndkRoot /M
|
||||
setx ANDROID_NDK_PATH $ndkRoot /M
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user