mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
Document environment variables of MacOS images (#2493)
* Document environment variables of MacOS images * Change adnroid variables * Apply reviews * Remove some variables, fix headers * Show link targets * rename helper * remove symlinks * More links
This commit is contained in:
@@ -30,3 +30,22 @@ function New-MDNewLine {
|
||||
$newLineSymbol = [System.Environment]::NewLine
|
||||
return $newLineSymbol * $Count
|
||||
}
|
||||
|
||||
function Get-LinkTarget {
|
||||
param (
|
||||
[string] $inputPath
|
||||
)
|
||||
$link = Get-Item $inputPath | Select-Object -ExpandProperty Target
|
||||
if ($link) {
|
||||
return " -> $link"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
function Get-PathWithLink {
|
||||
param (
|
||||
[string] $inputPath
|
||||
)
|
||||
$link = Get-LinkTarget($inputPath)
|
||||
return "${inputPath}${link}"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking
|
||||
|
||||
function Split-TableRowByColumns {
|
||||
param(
|
||||
[string] $Row
|
||||
@@ -98,6 +100,18 @@ function Build-AndroidTable {
|
||||
}
|
||||
}
|
||||
|
||||
function Build-AndroidEnvironmentTable {
|
||||
$androidVersions = Get-Item env:ANDROID_*
|
||||
|
||||
$shoulddResolveLink = 'ANDROID_NDK_PATH', 'ANDROID_NDK_HOME', 'ANDROID_NDK_ROOT', 'ANDROID_NDK_LATEST_HOME'
|
||||
return $androidVersions | Sort-Object -Property Name | ForEach-Object {
|
||||
[PSCustomObject] @{
|
||||
"Name" = $_.Name
|
||||
"Value" = if ($shoulddResolveLink.Contains($_.Name )) { Get-PathWithLink($_.Value) } else {$_.Value}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Get-AndroidPackageVersions {
|
||||
param (
|
||||
[Parameter(Mandatory)]
|
||||
|
||||
@@ -49,4 +49,26 @@ function Get-FirefoxVersion {
|
||||
|
||||
function Get-GeckodriverVersion {
|
||||
return Run-Command "geckodriver --version" | Select-Object -First 1
|
||||
}
|
||||
}
|
||||
|
||||
function Build-BrowserWebdriversEnvironmentTable {
|
||||
return @(
|
||||
@{
|
||||
"Name" = "CHROMEWEBDRIVER"
|
||||
"Value" = $env:CHROMEWEBDRIVER
|
||||
},
|
||||
@{
|
||||
"Name" = "EDGEWEBDRIVER"
|
||||
"Value" = $env:EDGEWEBDRIVER
|
||||
},
|
||||
@{
|
||||
"Name" = "GECKOWEBDRIVER"
|
||||
"Value" = $env:GECKOWEBDRIVER
|
||||
}
|
||||
) | ForEach-Object {
|
||||
[PSCustomObject] @{
|
||||
"Name" = $_.Name
|
||||
"Value" = $_.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking
|
||||
|
||||
function Get-BashVersion {
|
||||
$version = bash -c 'echo ${BASH_VERSION}'
|
||||
return "Bash $version"
|
||||
@@ -472,4 +470,22 @@ function Get-SwiftLintVersion {
|
||||
function Get-PowershellVersion {
|
||||
$powershellVersion = Run-Command "powershell --version"
|
||||
return $powershellVersion
|
||||
}
|
||||
}
|
||||
|
||||
function Build-PackageManagementEnvironmentTable {
|
||||
return @(
|
||||
@{
|
||||
"Name" = "CONDA"
|
||||
"Value" = $env:CONDA
|
||||
},
|
||||
@{
|
||||
"Name" = "VCPKG_INSTALLATION_ROOT"
|
||||
"Value" = $env:VCPKG_INSTALLATION_ROOT
|
||||
}
|
||||
) | ForEach-Object {
|
||||
[PSCustomObject] @{
|
||||
"Name" = $_.Name
|
||||
"Value" = $_.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ if ($os.IsHigherThanMojave) {
|
||||
}
|
||||
|
||||
$markdown += New-MDList -Style Unordered -Lines ($packageManagementList | Sort-Object)
|
||||
$markdown += New-MDHeader "Environment variables" -Level 4
|
||||
$markdown += Build-PackageManagementEnvironmentTable | New-MDTable
|
||||
$markdown += New-MDNewLine
|
||||
|
||||
# Project Management
|
||||
$markdown += New-MDHeader "Project Management" -Level 3
|
||||
@@ -183,6 +186,9 @@ $markdown += New-MDList -Style Unordered -Lines ($lintersList | Sort-Object)
|
||||
|
||||
$markdown += New-MDHeader "Browsers" -Level 3
|
||||
$markdown += Get-BrowserSection
|
||||
$markdown += New-MDHeader "Environment variables" -Level 4
|
||||
$markdown += Build-BrowserWebdriversEnvironmentTable | New-MDTable
|
||||
$markdown += New-MDNewLine
|
||||
|
||||
$markdown += New-MDHeader "Java" -Level 3
|
||||
$markdown += Get-JavaVersions | New-MDTable
|
||||
@@ -267,6 +273,9 @@ $markdown += New-MDNewLine
|
||||
$markdown += New-MDHeader "Android" -Level 3
|
||||
$markdown += Build-AndroidTable | New-MDTable
|
||||
$markdown += New-MDNewLine
|
||||
$markdown += New-MDHeader "Environment variables" -Level 4
|
||||
$markdown += Build-AndroidEnvironmentTable | New-MDTable
|
||||
$markdown += New-MDNewLine
|
||||
|
||||
#
|
||||
# Generate systeminfo.txt with information about image (for debug purpose)
|
||||
|
||||
Reference in New Issue
Block a user