Merge remote-tracking branch 'upstream/main' into main

This commit is contained in:
Aleksandr Chebotov
2020-09-28 13:52:54 +03:00
39 changed files with 1246 additions and 1444 deletions

View 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"

View 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"

View File

@@ -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 {