Compare commits

..

1 Commits

Author SHA1 Message Date
Image generation service account f39af236e8 Updating readme file for macOS-12 version 20220929.2 2022-10-03 08:06:29 +00:00
172 changed files with 5047 additions and 8378 deletions
+1
View File
@@ -39,6 +39,7 @@ body:
- label: Ubuntu 18.04
- label: Ubuntu 20.04
- label: Ubuntu 22.04
- label: macOS 10.15
- label: macOS 11
- label: macOS 12
- label: Windows Server 2019
+2 -2
View File
@@ -13,8 +13,7 @@ body:
label: Platforms affected
options:
- label: Azure DevOps
- label: GitHub Actions - Standard Runners
- label: GitHub Actions - Larger Runners
- label: GitHub Actions
- type: checkboxes
attributes:
label: Runner images affected
@@ -22,6 +21,7 @@ body:
- label: Ubuntu 18.04
- label: Ubuntu 20.04
- label: Ubuntu 22.04
- label: macOS 10.15
- label: macOS 11
- label: macOS 12
- label: Windows Server 2019
+1
View File
@@ -60,6 +60,7 @@ body:
- label: Ubuntu 18.04
- label: Ubuntu 20.04
- label: Ubuntu 22.04
- label: macOS 10.15
- label: macOS 11
- label: macOS 12
- label: Windows Server 2019
+2 -2
View File
@@ -1,6 +1,6 @@
# Description
New tool, Bug fixing, or Improvement?
Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.
New tool, Bug fixing, or Improvement?
Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.
**For new tools, please provide total size and installation time.**
<!-- Currently, we can't accept external contributions to macOS source. Please find more details in [CONTRIBUTING.md](CONTRIBUTING.md#macOS) guide -->
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Create release for ${{ github.event.client_payload.ReleaseBranchName }}
uses: actions/create-release@v1.1.1
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
fetch-depth: 0
-68
View File
@@ -1,68 +0,0 @@
name: Create and upload a SBOM to release assets
# Inherited variables:
# github.event.client_payload.agentSpec - Current YAML Label
# github.event.client_payload.ReleaseID - Current release ID
# github.event.client_payload.imageVersion - AzDO image version "major.minor"
# github.event.client_payload.ReleaseBranchName - Necessary to identify workflow run
#
# Current SYFT tool issues:
# macOS (minor): very long cataloging process (more than 6 hours) (https://github.com/anchore/syft/issues/1328),
# macOS (major): prompt privilegies that blocking process indefinetely (https://github.com/anchore/syft/issues/1367)
on:
repository_dispatch:
types: [generate-sbom]
defaults:
run:
shell: pwsh
jobs:
#Checking image version on available runner
version-check:
runs-on: ${{ github.event.client_payload.agentSpec }}
steps:
- name: Available image version check for ${{ github.event.client_payload.ReleaseBranchName }}
run: |
if ($env:ImageVersion -ne '${{ github.event.client_payload.imageVersion }}') {
throw "Current runner $env:ImageVersion image version don't match ${{ github.event.client_payload.imageVersion }}."
}
#Install and run SYFT, compress SBOM, upload it to release assets
create-sbom:
needs: version-check
runs-on: ${{ github.event.client_payload.agentSpec }}
steps:
#Installation section
- name: Install SYFT tool on Windows
if: ${{ runner.os == 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft
- name: Install SYFT tool on Ubuntu or macOS
if: ${{ runner.os != 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
#Running section.
- name: Run SYFT on Windows
if: ${{ runner.os == 'Windows' }}
run: D:/syft/syft dir:C:/ -vv -o spdx-json=sbom.json
- name: Run SYFT on Ubuntu
if: ${{ runner.os == 'Linux' }}
run: syft dir:/ -vv -o spdx-json=sbom.json
- name: Run SYFT on macOS
if: ${{ runner.os == 'macOS' }}
run: syft dir:/ -vv -o spdx-json=sbom.json --exclude ./Users --exclude ./System/Volumes --exclude ./private
#Preparing artifact (raw SBOM.json is too big)
- name: Compress SBOM file
run: Compress-Archive sbom.json sbom.json.zip
#Upload artifact action
- uses: actions/upload-artifact@v3
with:
name: sbom-${{ github.event.client_payload.agentSpec }}-${{ github.event.client_payload.imageVersion }}
path: sbom.json.zip
if-no-files-found: warn
#Upload release asset action
#Might be changed to softprops/action-gh-release after additional check
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: "https://uploads.github.com/repos/actions/runner-images/releases/${{ github.event.client_payload.ReleaseID }}/assets{?name,label}"
asset_path: ./sbom.json.zip
asset_name: sbom.${{ github.event.client_payload.agentSpec }}.json.zip
asset_content_type: application/zip
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
fetch-depth: 0
-212
View File
@@ -1,212 +0,0 @@
name: macOS image generation
on:
workflow_call:
inputs:
image_label:
type: string
description: macOS codename
required: true
base_image_name:
type: string
description: Base clean image
required: true
template_path:
type: string
description: Packer template path
required: true
target_datastore:
type: string
description: Image datastore
required: true
custom_repo:
type: string
description: Custom repo to checkout
required: false
custom_repo_commit_hash:
type: string
description: Custom repo commit hash
required: false
env:
KEYVAULT: imagegeneration
ESXI_CLUSTER: mcv2-build-unstable
VCENTER_DATACENTER: imagegen
OUTPUT_FOLDER: mms-output
BUILD_DATASTORE: ds-image
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: macos-vmware
timeout-minutes: 1200
steps:
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set image variables
run: |
$currentDate = Get-Date -Format "yyyyMMdd"
$templatePath = "${{ inputs.template_path }}"
$osName = $(($templatePath.Split("/")[-1]).Split(".")[0])
$virtualMachineName = "${osName}_${currentDate}_unstable.${{ github.run_id }}.${{ github.run_attempt }}"
$GitHubFeed = az keyvault secret show -n "github-feed-token" --vault-name "${{ env.KEYVAULT }}" --query value -o tsv
$VIUserName = az keyvault secret show -n "vcenter-username-v2" --vault-name "${{ env.KEYVAULT }}" --query value -o tsv
$VIPassword = az keyvault secret show -n "vcenter-password-v2" --vault-name "${{ env.KEYVAULT }}" --query value -o tsv
$XcodeUser = az keyvault secret show -n "xcode-installation-user" --vault-name "${{ env.KEYVAULT }}" --query value -o tsv
$XcodePassword = az keyvault secret show -n "xcode-installation-password" --vault-name "${{ env.KEYVAULT }}" --query value -o tsv
echo "::add-mask::$GitHubFeed"
echo "::add-mask::$VIUserName"
echo "::add-mask::$VIPassword"
echo "::add-mask::$XcodeUser"
echo "::add-mask::$XcodePassword"
"GH_FEED=$GitHubFeed" | Out-File -Append -FilePath $env:GITHUB_ENV
"VI_USER_NAME=$VIUserName" | Out-File -Append -FilePath $env:GITHUB_ENV
"VI_PASSWORD=$VIPassword" | Out-File -Append -FilePath $env:GITHUB_ENV
"XCODE_USER=$XcodeUser" | Out-File -Append -FilePath $env:GITHUB_ENV
"XCODE_PASSWORD=$XcodePassword" | Out-File -Append -FilePath $env:GITHUB_ENV
"VM_NAME=$virtualMachineName" | Out-File -Append -FilePath $env:GITHUB_ENV
- name: Determine checkout type
run: |
if ("${{ inputs.custom_repo }}" -and "${{ inputs.custom_repo_commit_hash }}") {
$checkoutType = "custom_repo"
} elseif (("${{ github.event_name }}" -eq "pull_request_target") -and ("${{ github.event.action }}" -eq "labeled" )) {
$checkoutType = "pull_request"
} else {
$checkoutType = "main"
}
"CHECKOUT_TYPE=$checkoutType" | Out-File -Append $env:GITHUB_ENV
- name: Checkout repository
if: ${{ env.CHECKOUT_TYPE == 'main' }}
uses: actions/checkout@v3
with:
repository: actions/runner-images
- name: Checkout PR
if: ${{ env.CHECKOUT_TYPE == 'pull_request' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout custom repository
if: ${{ env.CHECKOUT_TYPE == 'custom_repo' }}
uses: actions/checkout@v3
with:
repository: '${{ inputs.custom_repo }}'
ref: '${{ inputs.custom_repo_commit_hash }}'
- name: Validate contributor permissions
if: ${{ github.event_name == 'pull_request_target' }}
run: |
[string]$contributorAllowList = "${{ vars.CONTRIBUTOR_ALLOWLIST }}"
./images.CI/macos/validate-contributor.ps1 `
-RepositoryName ${{ github.repository }} `
-AccessToken ${{ env.GH_FEED }} `
-SourceBranch "refs/pull/${{ github.event.pull_request.number }}/merge" `
-ContributorAllowList $contributorAllowList
- name: Select datastore
run: |
./images.CI/macos/select-datastore.ps1 `
-VMName "${{ env.VM_NAME }}" `
-VIServer ${{ secrets.VISERVER_V2 }} `
-VIUserName ${{ env.VI_USER_NAME }} `
-VIPassword ${{ env.VI_PASSWORD }} `
-Cluster ${{ env.ESXI_CLUSTER }}
- name: Build VM
run: |
$SensitiveData = @(
'IP address:',
'Using ssh communicator to connect:'
)
packer build -on-error=abort `
-var="vcenter_server=${{ secrets.VISERVER_V2 }}" `
-var="vcenter_username=${{ env.VI_USER_NAME }}" `
-var="vcenter_password=${{ env.VI_PASSWORD }}" `
-var="vcenter_datacenter=${{ env.VCENTER_DATACENTER }}" `
-var="cluster_or_esxi_host=${{ env.ESXI_CLUSTER }}" `
-var="esxi_datastore=${{ env.BUILD_DATASTORE }}" `
-var="output_folder=${{ env.OUTPUT_FOLDER }}" `
-var="vm_username=${{ secrets.VM_USERNAME }}" `
-var="vm_password=${{ secrets.VM_PASSWORD }}" `
-var="github_api_pat=${{ secrets.GH_FEED_TOKEN }}" `
-var="build_id=${{ env.VM_NAME }}" `
-var="baseimage_name=${{ inputs.base_image_name }}" `
-var="xcode_install_user=${{ env.XCODE_USER }}" `
-var="xcode_install_password=${{ env.XCODE_PASSWORD }}" `
-color=false `
${{ inputs.template_path }} `
| Where-Object {
#Filter sensitive data from Packer logs
$currentString = $_
$sensitiveString = $SensitiveData | Where-Object { $currentString -match $_ }
$sensitiveString -eq $null
}
working-directory: images/macos
env:
PACKER_LOG: 1
PACKER_LOG_PATH: ${{ runner.temp }}/packer-log.txt
- name: Prepare artifact
shell: bash
run: |
echo "Preparing artifact directory"
mkdir -p ${{ runner.temp }}/artifacts
echo "Copy image output files"
cp -R "images/image-output/software-report/." "${{ runner.temp }}/artifacts"
echo "Put VM name to 'VM_Done_Name' file"
echo "${{ env.VM_NAME }}" > "${{ runner.temp }}/artifacts/VM_Done_Name"
- name: Print markdown software report
run: |
Get-Content "${{ runner.temp }}/artifacts/systeminfo.md"
- name: Print json software report
run: |
Get-Content "${{ runner.temp }}/artifacts/systeminfo.json"
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: Built_VM_Artifacts
path: ${{ runner.temp }}/artifacts/
- name: Print provisioners duration
run: |
./images.CI/measure-provisioners-duration.ps1 `
-PackerLogPath "${{ runner.temp }}/packer-log.txt" `
-PrintTopNLongest 25
- name: Move vm to cold storage and clear datastore tag
run: |
$cpuCount = 3
$coresPerSocketCount = 3
$memory = 14336
./images.CI/macos/move-vm.ps1 `
-VMName "${{ env.VM_NAME }}" `
-TargetDataStore "${{ inputs.target_datastore }}" `
-VIServer "${{ secrets.VISERVER_V2 }}" `
-VIUserName "${{ env.VI_USER_NAME }}" `
-VIPassword "${{ env.VI_PASSWORD }}" `
-CpuCount "$cpuCount" `
-CoresPerSocketCount "$coresPerSocketCount" `
-Memory "$memory"
- name: Destroy VM (if build canceled only)
if: ${{ cancelled() }}
run: |
./images.CI/macos/destroy-vm.ps1 `
-VMName "${{ env.VM_NAME }}" `
-VIServer "${{ secrets.VISERVER_V2 }}" `
-VIUserName "${{ env.VI_USER_NAME }}" `
-VIPassword "${{ env.VI_PASSWORD }}"
-30
View File
@@ -1,30 +0,0 @@
run-name: macOS-11_unstable.${{ github.run_id }}.${{ github.run_attempt }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/macos/**'
schedule:
- cron: '0 0 * * *'
jobs:
macOS_11:
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-11') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
name: macOS-11_unstable.${{ github.run_id }}.${{ github.run_attempt }}
uses: ./.github/workflows/macos-generation.yml
with:
image_label: 'macOS Big Sur'
base_image_name: 'clean-macOS-11-380Gb-runner'
template_path: 'templates/macOS-11.json'
target_datastore: 'ds-image'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
-30
View File
@@ -1,30 +0,0 @@
run-name: macOS-12_unstable.${{ github.run_id }}.${{ github.run_attempt }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/macos/**'
schedule:
- cron: '0 0 * * *'
jobs:
macOS_12:
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-12') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
name: macOS-12_unstable.${{ github.run_id }}.${{ github.run_attempt }}
uses: ./.github/workflows/macos-generation.yml
with:
image_label: 'macOS Monterey'
base_image_name: 'clean-macOS-12-380Gb-runner'
template_path: 'templates/macOS-12.json'
target_datastore: 'ds-image'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_commit_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
fetch-depth: 0
-25
View File
@@ -1,25 +0,0 @@
# CI Validation
name: PowerShell Tests
on:
pull_request:
branches: [ main ]
paths:
- 'helpers/software-report-base/**'
jobs:
powershell-tests:
name: PowerShell tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run Software Report module tests
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
Invoke-Pester -Output Detailed "helpers/software-report-base/tests"
-128
View File
@@ -1,128 +0,0 @@
name: MMS image generation
on:
workflow_call:
inputs:
image_name:
type: string
description: An OS image to build
required: true
image_readme_name:
type: string
description: README file path
required: true
custom_repo:
type: string
description: Custom repo to checkout
required: false
custom_repo_commit_hash:
type: string
description: Custom repo commit hash
required: false
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: azure-builds
timeout-minutes: 1200
steps:
- name: Determine checkout type
run: |
if ("${{ inputs.custom_repo }}" -and "${{ inputs.custom_repo_commit_hash }}") {
$checkoutType = "custom_repo"
} elseif (("${{ github.event_name }}" -eq "pull_request_target") -and ("${{ github.event.action }}" -eq "labeled" )) {
$checkoutType = "pull_request"
} else {
$checkoutType = "main"
}
"CHECKOUT_TYPE=$checkoutType" | Out-File -Append $env:GITHUB_ENV
- name: Checkout repository
if: ${{ env.CHECKOUT_TYPE == 'main' }}
uses: actions/checkout@v3
with:
repository: actions/runner-images
- name: Checkout PR
if: ${{ env.CHECKOUT_TYPE == 'pull_request' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout custom repository
if: ${{ env.CHECKOUT_TYPE == 'custom_repo' }}
uses: actions/checkout@v3
with:
repository: '${{ inputs.custom_repo }}'
ref: '${{ inputs.custom_repo_commit_hash }}'
- name: Set image varibles
run: |
$ImageType = "${{ inputs.image_name }}"
if ($ImageType.StartsWith("ubuntu")) { $TemplateDirectoryName = "linux" } else { $TemplateDirectoryName = "win" }
$TemplateDirectoryPath = Join-Path "images" $TemplateDirectoryName | Resolve-Path
$TemplatePath = Join-Path $TemplateDirectoryPath "$ImageType.pkr.hcl"
if ( -not (Test-Path $TemplatePath) ) {
$TemplatePath = Join-Path $TemplateDirectoryPath "$ImageType.json"
}
"TemplatePath=$TemplatePath" | Out-File -Append -FilePath $env:GITHUB_ENV
"TemplateDirectoryPath=$TemplateDirectoryPath" | Out-File -Append -FilePath $env:GITHUB_ENV
"ImageType=$ImageType" | Out-File -Append -FilePath $env:GITHUB_ENV
- name: Build image
run: |
./images.CI/linux-and-win/build-image.ps1 `
-TemplatePath ${{ env.TemplatePath }} `
-ClientId ${{ secrets.CLIENT_ID }} `
-ClientSecret ${{ secrets.CLIENT_SECRET }} `
-Location ${{ secrets.AZURE_LOCATION }} `
-ResourcesNamePrefix ${{ github.run_number }} `
-ResourceGroup ${{ secrets.AZURE_RESOURCE_GROUP }} `
-StorageAccount ${{ secrets.AZURE_STORAGE_ACCOUNT }} `
-SubscriptionId ${{ secrets.AZURE_SUBSCRIPTION }} `
-TenantId ${{ secrets.AZURE_TENANT }} `
-VirtualNetworkName ${{ secrets.BUILD_AGENT_VNET_NAME }} `
-VirtualNetworkSubnet ${{ secrets.BUILD_AGENT_SUBNET_NAME }} `
-VirtualNetworkRG ${{ secrets.BUILD_AGENT_VNET_RESOURCE_GROUP }} `
env:
PACKER_LOG: 1
PACKER_LOG_PATH: ${{ runner.temp }}/packer-log.txt
RUN_VALIDATION_FLAG: true
- name: Output Readme file content
run: |
Get-Content -Path (Join-Path "$env:TemplateDirectoryPath" "${{ inputs.image_readme_name }}")
- name: Print provisioners duration
run: |
./images.CI/measure-provisioners-duration.ps1 `
-PackerLogPath "${{ runner.temp }}/packer-log.txt" `
-PrefixToPathTrim ${{ env.TemplateDirectoryPath }} `
-PrintTopNLongest 25
- name: Create release for VM deployment
run: |
./images.CI/linux-and-win/create-release.ps1 `
-BuildId ${{ github.run_number }} `
-Organization ${{ secrets.RELEASE_TARGET_ORGANIZATION }} `
-DefinitionId ${{ secrets.RELEASE_TARGET_DEFINITION_ID }} `
-Project ${{ secrets.RELEASE_TARGET_PROJECT }} `
-ImageName ${{ env.ImageType }} `
-AccessToken ${{ secrets.RELEASE_TARGET_TOKEN }}
- name: Clean up resources
if: ${{ always() }}
run: |
./images.CI/linux-and-win/cleanup.ps1 `
-ResourcesNamePrefix ${{ github.run_number }} `
-Image ${{ env.ImageType }} `
-StorageAccount ${{ secrets.AZURE_STORAGE_ACCOUNT }} `
-SubscriptionId ${{ secrets.AZURE_SUBSCRIPTION }} `
-ClientId ${{ secrets.CLIENT_ID }} `
-ClientSecret ${{ secrets.CLIENT_SECRET }} `
-TenantId ${{ secrets.AZURE_TENANT }}
-27
View File
@@ -1,27 +0,0 @@
run-name: Ubuntu20.04 - ${{ (github.event.pull_request.title || 'scheduled/manual run') }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/linux/**'
schedule:
- cron: '0 0 * * *'
jobs:
Ubuntu_2004:
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2004') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
uses: ./.github/workflows/ubuntu-win-generation.yml
with:
image_name: 'ubuntu2004'
image_readme_name: 'Ubuntu2004-Readme.md'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_commit_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
-27
View File
@@ -1,27 +0,0 @@
run-name: Ubuntu22.04 - ${{ (github.event.pull_request.title || 'scheduled/manual run') }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/linux/**'
schedule:
- cron: '0 0 * * *'
jobs:
Ubuntu_2204:
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2204') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
uses: ./.github/workflows/ubuntu-win-generation.yml
with:
image_name: 'ubuntu2204'
image_readme_name: 'Ubuntu2204-Readme.md'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_commit_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Update release for ${{ github.event.client_payload.ReleaseBranchName }}
uses: actions/github-script@v2
-27
View File
@@ -1,27 +0,0 @@
run-name: Windows 2019 - ${{ (github.event.pull_request.title || 'scheduled/manual run') }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/win/**'
schedule:
- cron: '0 0 * * *'
jobs:
Windows_2019:
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2019') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
uses: ./.github/workflows/ubuntu-win-generation.yml
with:
image_name: 'windows2019'
image_readme_name: 'Windows2019-Readme.md'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_commit_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
-27
View File
@@ -1,27 +0,0 @@
run-name: Windows 2022 - ${{ (github.event.pull_request.title || 'scheduled/manual run') }}
on:
workflow_dispatch:
inputs:
CUSTOM_REPOSITORY:
description: 'Custom repository (owner/repo)'
required: false
CUSTOM_REPOSITORY_COMMIT_HASH:
description: 'Commit hash'
required: false
pull_request_target:
types: labeled
paths:
- 'images/win/**'
schedule:
- cron: '0 0 * * *'
jobs:
Windows_2022:
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2022') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
uses: ./.github/workflows/ubuntu-win-generation.yml
with:
image_name: 'windows2022'
image_readme_name: 'Windows2022-Readme.md'
custom_repo: ${{ github.event.inputs.CUSTOM_REPOSITORY }}
custom_repo_commit_hash: ${{ github.event.inputs.CUSTOM_REPOSITORY_COMMIT_HASH }}
secrets: inherit
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 GitHub
Copyright (c) 2022 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+4 -24
View File
@@ -5,7 +5,6 @@
- [About](#about)
- [Available Images](#available-images)
- [Ongoing migrations](#ongoing-migrations)
- [Image Definitions](#image-definitions)
- [Image Releases](#image-releases)
- [Software and Image Support](#software-and-image-support)
@@ -21,11 +20,11 @@ To build a VM machine from this repo's source, see the [instructions](docs/creat
| Image | YAML Label | Included Software | Rollout Progress of Latest Image Release |
| --------------------|---------------------|--------------------|---------------------|
| Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` | [ubuntu-22.04] | [![status22](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu22&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu22&redirect=1)
| Ubuntu 20.04 | `ubuntu-20.04` | [ubuntu-20.04] | [![status20](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu20&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu20&redirect=1)
| Ubuntu 22.04 | `ubuntu-22.04` | [ubuntu-22.04] | [![status22](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu22&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu22&redirect=1)
| Ubuntu 20.04 | `ubuntu-latest` or `ubuntu-20.04` | [ubuntu-20.04] | [![status20](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu20&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu20&redirect=1)
| Ubuntu 18.04 <sup>deprecated</sup> | `ubuntu-18.04` | [ubuntu-18.04] | [![status18](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu18&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=ubuntu18&redirect=1)
| macOS 12 | `macos-latest` or `macos-12`| [macOS-12] | [![statusumac12](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-12&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-12&redirect=1)
| macOS 11 | `macos-11`| [macOS-11] | [![statusmac11](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-11&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-11&redirect=1)
| macOS 12 | `macos-12`| [macOS-12] | [![statusumac12](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-12&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-12&redirect=1)
| macOS 11 | `macos-latest` or `macos-11`| [macOS-11] | [![statusmac11](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-11&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-11&redirect=1)
| macOS 10.15 <sup>deprecated</sup> | `macos-10.15` | [macOS-10.15] | [![statusmac10](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-10.15&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=macos-10.15&redirect=1)
| Windows Server 2022 | `windows-latest` or `windows-2022` | [windows-2022] | [![statuswin22](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=windows-2022&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=windows-2022&redirect=1) |
| Windows Server 2019 | `windows-2019` | [windows-2019] | [![statuswin19](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=windows-2019&badge=1)](https://actionvirtualenvironmentsstatus.azurewebsites.net/api/status?imageName=windows-2019&redirect=1)
@@ -45,10 +44,6 @@ To build a VM machine from this repo's source, see the [instructions](docs/creat
[macOS-10.15]: https://github.com/actions/runner-images/blob/main/images/macos/macos-10.15-Readme.md
[self-hosted runners]: https://help.github.com/en/actions/hosting-your-own-runners
## Ongoing migrations
There are no migrations in progress.
## Image Definitions
### Beta
@@ -110,21 +105,6 @@ latest 2 versions of an OS.
| Android NDK | 1 latest non-LTS, 2 latest LTS versions |
| Xcode | - all OS compatible versions side-by-side <br/> - for beta, GM versions - latest beta only <br/> - old patch versions are deprecated in 3 months |
### Package managers usage
We use third-party package managers to install software during the image generation process. The table below lists the package managers and the software installed.
> **Note**: third-party repositories are re-evaluated every year to identify if they are still useful and secure.
| Operating system | Package manager | Third-party repos and packages |
| :--- | :---: | ---: |
| Ubuntu | [APT](https://wiki.debian.org/Apt) | [Eclipse-Timurin (Adoptium)](https://packages.adoptium.net/artifactory/deb) </br> [Erlang](https://packages.erlang-solutions.com/ubuntu) </br>[Firefox](https://launchpad.net/~mozillateam/+archive/ubuntu/ppa) </br> [gcc, gfortran](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test) </br> [git](https://launchpad.net/~git-core/+archive/ubuntu/ppa) </br> [HHvm](https://dl.hhvm.com/ubuntu) </br> [PHP](https://launchpad.net/~ondrej/+archive/ubuntu/php) (Ubuntu 18 & 20 only) </br> [Mono](https://download.mono-project.com/repo/ubuntu) </br> [PostgreSQL](https://apt.postgresql.org/pub/repos/apt) </br> [R](https://cloud.r-project.org/bin/linux/ubuntu) |
| | [pipx](https://pypa.github.io/pipx) | ansible-core </br>yamllint |
| Windows | [Chocolatey](https://chocolatey.org) | No third-party repos installed |
| macOS | [Homebrew](https://homebrew.sh) | [aws-cli v2](https://github.com/aws/homebrew-tap) </br> [azure/bicep](https://github.com/Azure/homebrew-bicep) </br> [graalvm-ce-java11](https://github.com/graalvm/homebrew-tap) </br> [mongodb/brew](https://github.com/mongodb/homebrew-brew) |
| | [pipx](https://pypa.github.io/pipx/) | yamllint |
### Image Deprecation Policy
- Images begin the deprecation process of the oldest image label once a new GA OS version has been released.
+1 -1
View File
@@ -9,7 +9,7 @@ After successful image generation, a snapshot of the temporary VM will be conver
## Prerequisites and Image-generation
### Build Agent requirements
- `OS` - Windows/Linux
- `packer 1.8.2 or higher` - Can be downloaded from https://www.packer.io/downloads
- `packer` - Can be downloaded from https://www.packer.io/downloads
- `PowerShell 5.0 or higher` or `PSCore` for linux distributes.
- `Azure CLI ` - https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
- `Azure Az Powershell module` - https://docs.microsoft.com/en-us/powershell/azure/install-az-ps
@@ -1,66 +0,0 @@
using module ./SoftwareReport.psm1
using module ./SoftwareReport.DifferenceCalculator.psm1
<#
.SYNOPSIS
Calculates the difference between two software reports and saves it to a file.
.PARAMETER PreviousJsonReportPath
Path to the previous software report.
.PARAMETER CurrentJsonReportPath
Path to the current software report.
.PARAMETER OutputFile
Path to the file where the difference will be saved.
.PARAMETER ReleaseBranchName
Name of the release branch to build image docs URL.
.PARAMETER ReadmePath
Path to the README file in repository to build image docs URL.
#>
Param (
[Parameter(Mandatory=$true)]
[string] $PreviousJsonReportPath,
[Parameter(Mandatory=$true)]
[string] $CurrentJsonReportPath,
[Parameter(Mandatory=$true)]
[string] $OutputFile,
[Parameter(Mandatory=$false)]
[string] $ReleaseBranchName,
[Parameter(Mandatory=$false)]
[string] $ReadmePath
)
$ErrorActionPreference = "Stop"
$global:ErrorView = "NormalView"
function Read-SoftwareReport {
Param (
[Parameter(Mandatory=$true)]
[string] $JsonReportPath
)
if (-not (Test-Path $JsonReportPath)) {
throw "File '$JsonReportPath' does not exist"
}
$jsonReport = Get-Content -Path $JsonReportPath -Raw
$report = [SoftwareReport]::FromJson($jsonReport)
return $report
}
$previousReport = Read-SoftwareReport -JsonReportPath $PreviousJsonReportPath
$currentReport = Read-SoftwareReport -JsonReportPath $CurrentJsonReportPath
$comparer = [SoftwareReportDifferenceCalculator]::new($previousReport, $currentReport)
$comparer.CompareReports()
$diff = $comparer.GetMarkdownReport()
if ($ReleaseBranchName -and $ReadmePath) {
# https://github.com/actions/runner-images/blob/releases/macOS-12/20221215/images/macos/macos-12-Readme.md
$ImageDocsUrl = "https://github.com/actions/runner-images/blob/${ReleaseBranchName}/${ReadmePath}"
$diff += "`n`n`nFor comprehensive list of software installed on this image please click [here]($ImageDocsUrl)."
}
$parentDirectory = Split-Path $OutputFile -Parent
if (-not (Test-Path $parentDirectory)) { New-Item -Path $parentDirectory -ItemType Directory | Out-Null }
$diff | Out-File -Path $OutputFile -Encoding utf8NoBOM
@@ -1,56 +0,0 @@
############################
### Abstract base nodes ####
############################
# Abstract base class for all nodes
class BaseNode {
[Boolean] ShouldBeIncludedToDiff() {
return $false
}
[String] ToMarkdown() {
return $this.ToMarkdown(1)
}
[String] ToMarkdown([Int32] $Level) {
throw "Abtract method 'ToMarkdown(level)' is not implemented for '$($this.GetType().Name)'"
}
[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
throw "Abtract method 'IsSimilarTo' is not implemented for '$($this.GetType().Name)'"
}
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
throw "Abtract method 'IsIdenticalTo' is not implemented for '$($this.GetType().Name)'"
}
}
# Abstract base class for all nodes that describe a tool and should be rendered inside diff table
class BaseToolNode: BaseNode {
[ValidateNotNullOrEmpty()]
[String] $ToolName
BaseToolNode([String] $ToolName) {
$this.ToolName = $ToolName
}
[Boolean] ShouldBeIncludedToDiff() {
return $true
}
[String] GetValue() {
throw "Abtract method 'GetValue' is not implemented for '$($this.GetType().Name)'"
}
[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
if ($this.GetType() -ne $OtherNode.GetType()) {
return $false
}
return $this.ToolName -eq $OtherNode.ToolName
}
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
return $this.IsSimilarTo($OtherNode) -and ($this.GetValue() -eq $OtherNode.GetValue())
}
}
@@ -1,136 +0,0 @@
using module ./SoftwareReport.psm1
using module ./SoftwareReport.BaseNodes.psm1
using module ./SoftwareReport.Nodes.psm1
using module ./SoftwareReport.DifferenceRender.psm1
class SoftwareReportDifferenceCalculator {
[ValidateNotNullOrEmpty()]
hidden [SoftwareReport] $PreviousReport
[ValidateNotNullOrEmpty()]
hidden [SoftwareReport] $CurrentReport
hidden [Collections.Generic.List[ReportDifferenceItem]] $AddedItems
hidden [Collections.Generic.List[ReportDifferenceItem]] $ChangedItems
hidden [Collections.Generic.List[ReportDifferenceItem]] $DeletedItems
SoftwareReportDifferenceCalculator([SoftwareReport] $PreviousReport, [SoftwareReport] $CurrentReport) {
$this.PreviousReport = $PreviousReport
$this.CurrentReport = $CurrentReport
}
[void] CompareReports() {
$this.AddedItems = @()
$this.ChangedItems = @()
$this.DeletedItems = @()
$this.CompareInternal($this.PreviousReport.Root, $this.CurrentReport.Root, @())
}
[String] GetMarkdownReport() {
$reporter = [SoftwareReportDifferenceRender]::new()
$report = $reporter.GenerateMarkdownReport($this.CurrentReport, $this.PreviousReport, $this.AddedItems, $this.ChangedItems, $this.DeletedItems)
return $report
}
hidden [void] CompareInternal([HeaderNode] $previousReportPointer, [HeaderNode] $currentReportPointer, [String[]] $Headers) {
$currentReportPointer.Children ?? @() | Where-Object { $_.ShouldBeIncludedToDiff() -and $this.FilterExcludedNodes($_) } | ForEach-Object {
$currentReportNode = $_
$sameNodeInPreviousReport = $previousReportPointer ? $previousReportPointer.FindSimilarChildNode($currentReportNode) : $null
if ($currentReportNode -is [HeaderNode]) {
# Compare HeaderNode recursively
$this.CompareInternal($sameNodeInPreviousReport, $currentReportNode, $Headers + $currentReportNode.Title)
} else {
if ($sameNodeInPreviousReport -and ($currentReportNode.IsIdenticalTo($sameNodeInPreviousReport))) {
# Nodes are identical, nothing changed, just ignore it
} elseif ($sameNodeInPreviousReport) {
# Nodes are equal but not identical, something was changed
if ($currentReportNode -is [TableNode]) {
$this.CompareSimilarTableNodes($sameNodeInPreviousReport, $currentReportNode, $Headers)
} elseif ($currentReportNode -is [ToolVersionsListNode]) {
$this.CompareSimilarToolVersionsListNodes($sameNodeInPreviousReport, $currentReportNode, $Headers)
} else {
$this.ChangedItems.Add([ReportDifferenceItem]::new($sameNodeInPreviousReport, $currentReportNode, $Headers))
}
} else {
# Node was not found in previous report, new node was added
$this.AddedItems.Add([ReportDifferenceItem]::new($null, $currentReportNode, $Headers))
}
}
}
# Detecting nodes that were removed
$previousReportPointer.Children ?? @() | Where-Object { $_.ShouldBeIncludedToDiff() -and $this.FilterExcludedNodes($_) } | ForEach-Object {
$previousReportNode = $_
$sameNodeInCurrentReport = $currentReportPointer ? $currentReportPointer.FindSimilarChildNode($previousReportNode) : $null
if (-not $sameNodeInCurrentReport) {
if ($previousReportNode -is [HeaderNode]) {
# Compare removed HeaderNode recursively
$this.CompareInternal($previousReportNode, $null, $Headers + $previousReportNode.Title)
} else {
# Node was not found in current report, node was removed
$this.DeletedItems.Add([ReportDifferenceItem]::new($previousReportNode, $null, $Headers))
}
}
}
}
hidden [void] CompareSimilarTableNodes([TableNode] $PreviousReportNode, [TableNode] $CurrentReportNode, [String[]] $Headers) {
$addedRows = $CurrentReportNode.Rows | Where-Object { $_ -notin $PreviousReportNode.Rows }
$deletedRows = $PreviousReportNode.Rows | Where-Object { $_ -notin $CurrentReportNode.Rows }
if (($addedRows.Count -eq 0) -and ($deletedRows.Count -eq 0)) {
# Unexpected state: TableNodes are identical
return
}
if ($PreviousReportNode.Headers -ne $CurrentReportNode.Headers) {
# If headers are changed and rows are changed at the same time, we should track it as removing table and adding new one
$this.DeletedItems.Add([ReportDifferenceItem]::new($PreviousReportNode, $null, $Headers))
$this.AddedItems.Add([ReportDifferenceItem]::new($null, $CurrentReportNode, $Headers))
} elseif (($addedRows.Count -gt 0) -and ($deletedRows.Count -eq 0)) {
# If new rows were added and no rows were deleted, then it is AddedItem
$this.AddedItems.Add([ReportDifferenceItem]::new($PreviousReportNode, $CurrentReportNode, $Headers))
} elseif (($deletedRows.Count -gt 0) -and ($addedRows.Count -eq 0)) {
# If no rows were added and some rows were deleted, then it is DeletedItem
$this.DeletedItems.Add([ReportDifferenceItem]::new($PreviousReportNode, $CurrentReportNode, $Headers))
} else {
# If some rows were added and some rows were removed, then it is UpdatedItem
$this.ChangedItems.Add([ReportDifferenceItem]::new($PreviousReportNode, $CurrentReportNode, $Headers))
}
}
hidden [void] CompareSimilarToolVersionsListNodes([ToolVersionsListNode] $PreviousReportNode, [ToolVersionsListNode] $CurrentReportNode, [String[]] $Headers) {
$previousReportMajorVersions = $PreviousReportNode.Versions | ForEach-Object { $PreviousReportNode.ExtractMajorVersion($_) }
$currentReportMajorVersion = $CurrentReportNode.Versions | ForEach-Object { $CurrentReportNode.ExtractMajorVersion($_) }
$addedVersions = $CurrentReportNode.Versions | Where-Object { $CurrentReportNode.ExtractMajorVersion($_) -notin $previousReportMajorVersions }
$deletedVersions = $PreviousReportNode.Versions | Where-Object { $PreviousReportNode.ExtractMajorVersion($_) -notin $currentReportMajorVersion }
$changedPreviousVersions = $PreviousReportNode.Versions | Where-Object { ($PreviousReportNode.ExtractMajorVersion($_) -in $currentReportMajorVersion) -and ($_ -notin $CurrentReportNode.Versions) }
$changedCurrentVersions = $CurrentReportNode.Versions | Where-Object { ($CurrentReportNode.ExtractMajorVersion($_) -in $previousReportMajorVersions) -and ($_ -notin $PreviousReportNode.Versions) }
if ($addedVersions.Count -gt 0) {
$this.AddedItems.Add([ReportDifferenceItem]::new($null, [ToolVersionsListNode]::new($CurrentReportNode.ToolName, $addedVersions, $CurrentReportNode.MajorVersionRegex, "List"), $Headers))
}
if ($deletedVersions.Count -gt 0) {
$this.DeletedItems.Add([ReportDifferenceItem]::new([ToolVersionsListNode]::new($PreviousReportNode.ToolName, $deletedVersions, $PreviousReportNode.MajorVersionRegex, "List"), $null, $Headers))
}
$previousChangedNode = ($changedPreviousVersions.Count -gt 0) ? [ToolVersionsListNode]::new($PreviousReportNode.ToolName, $changedPreviousVersions, $PreviousReportNode.MajorVersionRegex, "List") : $null
$currentChangedNode = ($changedCurrentVersions.Count -gt 0) ? [ToolVersionsListNode]::new($CurrentReportNode.ToolName, $changedCurrentVersions, $CurrentReportNode.MajorVersionRegex, "List") : $null
if ($previousChangedNode -and $currentChangedNode) {
$this.ChangedItems.Add([ReportDifferenceItem]::new($previousChangedNode, $currentChangedNode, $Headers))
}
}
hidden [Boolean] FilterExcludedNodes([BaseNode] $Node) {
# We shouldn't show "Image Version" diff because it is already shown in report header
if (($Node -is [ToolVersionNode]) -and ($Node.ToolName -eq "Image Version:")) {
return $false
}
return $true
}
}
@@ -1,225 +0,0 @@
using module ./SoftwareReport.psm1
using module ./SoftwareReport.BaseNodes.psm1
using module ./SoftwareReport.Nodes.psm1
class SoftwareReportDifferenceRender {
[String] GenerateMarkdownReport([SoftwareReport] $CurrentReport, [SoftwareReport] $PreviousReport, [ReportDifferenceItem[]] $AddedItems, [ReportDifferenceItem[]] $ChangedItems, [ReportDifferenceItem[]] $DeletedItems) {
$sb = [System.Text.StringBuilder]::new()
$rootNode = $CurrentReport.Root
$imageVersion = $CurrentReport.GetImageVersion()
$previousImageVersion = $PreviousReport.GetImageVersion()
#############################
### Render report header ####
#############################
$sb.AppendLine("# :desktop_computer: Actions Runner Image: $($rootNode.Title)")
# ToolVersionNodes on root level contains main image description so just copy-paste them to final report
$rootNode.Children | Where-Object { $_ -is [ToolVersionNode] } | ForEach-Object {
$sb.AppendLine($_.ToMarkdown())
}
$sb.AppendLine()
$sb.AppendLine("## :mega: What's changed?").AppendLine()
###########################
### Render added items ####
###########################
[ReportDifferenceItem[]] $addedItemsBaseTools = $AddedItems | Where-Object { $_.IsBaseToolNode() }
[ReportDifferenceItem[]] $addedItemsTables = $AddedItems | Where-Object { $_.IsTableNode() }
if ($addedItemsBaseTools.Count + $addedItemsTables.Count -gt 0) {
$sb.AppendLine("### Added :heavy_plus_sign:").AppendLine()
}
if ($addedItemsBaseTools.Count -gt 0) {
$tableItems = $addedItemsBaseTools | ForEach-Object {
[PSCustomObject]@{
"Category" = $this.RenderCategory($_.Headers, $true);
"Tool name" = $this.RenderToolName($_.CurrentReportNode.ToolName);
"Current ($imageVersion)" = $_.CurrentReportNode.GetValue();
}
}
$sb.AppendLine($this.RenderHtmlTable($tableItems, "Category"))
}
if ($addedItemsTables.Count -gt 0) {
$addedItemsTables | ForEach-Object {
$sb.AppendLine($this.RenderTableNodesDiff($_))
}
}
#############################
### Render deleted items ####
#############################
[ReportDifferenceItem[]] $deletedItemsBaseTools = $DeletedItems | Where-Object { $_.IsBaseToolNode() }
[ReportDifferenceItem[]] $deletedItemsTables = $DeletedItems | Where-Object { $_.IsTableNode() }
if ($deletedItemsBaseTools.Count + $deletedItemsTables.Count -gt 0) {
$sb.AppendLine("### Deleted :heavy_minus_sign:").AppendLine()
}
if ($deletedItemsBaseTools.Count -gt 0) {
$tableItems = $deletedItemsBaseTools | ForEach-Object {
[PSCustomObject]@{
"Category" = $this.RenderCategory($_.Headers, $true);
"Tool name" = $this.RenderToolName($_.PreviousReportNode.ToolName);
"Previous ($previousImageVersion)" = $_.PreviousReportNode.GetValue();
}
}
$sb.AppendLine($this.RenderHtmlTable($tableItems, "Category"))
}
if ($deletedItemsTables.Count -gt 0) {
$deletedItemsTables | ForEach-Object {
$sb.AppendLine($this.RenderTableNodesDiff($_))
}
}
#############################
### Render updated items ####
#############################
[ReportDifferenceItem[]] $changedItemsBaseTools = $ChangedItems | Where-Object { $_.IsBaseToolNode() }
[ReportDifferenceItem[]] $changedItemsTables = $ChangedItems | Where-Object { $_.IsTableNode() }
if ($changedItemsBaseTools.Count + $changedItemsTables.Count -gt 0) {
$sb.AppendLine("### Updated").AppendLine()
}
if ($changedItemsBaseTools.Count -gt 0) {
$tableItems = $changedItemsBaseTools | ForEach-Object {
[PSCustomObject]@{
"Category" = $this.RenderCategory($_.Headers, $true);
"Tool name" = $this.RenderToolName($_.CurrentReportNode.ToolName);
"Previous ($previousImageVersion)" = $_.PreviousReportNode.GetValue();
"Current ($imageVersion)" = $_.CurrentReportNode.GetValue();
}
}
$sb.AppendLine($this.RenderHtmlTable($tableItems, "Category"))
}
if ($changedItemsTables.Count -gt 0) {
$changedItemsTables | ForEach-Object {
$sb.AppendLine($this.RenderTableNodesDiff($_))
}
}
return $sb.ToString()
}
[String] RenderHtmlTable([PSCustomObject[]] $Table, [String] $RowSpanColumnName) {
$headers = $Table[0].PSObject.Properties.Name
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine("<table>")
$sb.AppendLine(" <thead>")
$headers | ForEach-Object {
$sb.AppendLine(" <th>$_</th>")
}
$sb.AppendLine(" </thead>")
$sb.AppendLine(" <tbody>")
$tableRowSpans = $this.CalculateHtmlTableRowSpan($Table, $RowSpanColumnName)
for ($rowIndex = 0; $rowIndex -lt $Table.Count; $rowIndex++) {
$row = $Table[$rowIndex]
$sb.AppendLine(" <tr>")
$headers | ForEach-Object {
if ($_ -eq $RowSpanColumnName) {
if ($tableRowSpans[$rowIndex] -gt 0) {
$sb.AppendLine(" <td rowspan=`"$($tableRowSpans[$rowIndex])`">$($row.$_)</td>")
} else {
# Skip rendering this cell at all
}
} else {
$sb.AppendLine(" <td>$($row.$_)</td>")
}
}
$sb.AppendLine(" </tr>")
}
$sb.AppendLine(" </tbody>")
$sb.AppendLine("</table>")
return $sb.ToString()
}
[int[]] CalculateHtmlTableRowSpan([PSCustomObject[]] $Table, [String] $keyColumn) {
$result = @(0) * $Table.Count
for ($rowIndex = $Table.Count - 1; $rowIndex -ge 0; $rowIndex--) {
if (($rowIndex -lt ($Table.Count - 1)) -and ($Table[$rowIndex].$keyColumn -eq $Table[$rowIndex + 1].$keyColumn)) {
# If the current row is the same as the next row
# Then rowspan of current row should be equal to rowspan of the next row + 1
# And rowspan of the next row should be 0 because it is already included in the rowspan of the current row
$result[$rowIndex] = $result[$rowIndex + 1] + 1
$result[$rowIndex + 1] = 0
} else {
$result[$rowIndex] = 1
}
}
return $result
}
[String] RenderTableNodesDiff([ReportDifferenceItem] $DiffItem) {
# Use the simplest approach for now: first, print all removed lines. Then print added lines
# It will work well for most cases like changing existing rows, adding new rows and removing rows
# But can produce not so pretty results for cases when some rows are changed and some rows are added at the same time
# Let's see how it works in practice and improve it later if needed
[String] $tableHeaders = ($DiffItem.CurrentReportNode ?? $DiffItem.PreviousReportNode).Headers
[Collections.Generic.List[String]] $tableRows = @()
$DiffItem.PreviousReportNode.Rows ?? @() | Where-Object { $_ -notin $DiffItem.CurrentReportNode.Rows } | ForEach-Object {
$tableRows.Add($this.StrikeTableRow($_))
}
$DiffItem.CurrentReportNode.Rows ?? @() | Where-Object { $_ -notin $DiffItem.PreviousReportNode.Rows } | ForEach-Object {
$tableRows.Add($_)
}
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine("#### $($this.RenderCategory($DiffItem.Headers, $false))")
$sb.AppendLine([TableNode]::new($tableHeaders, $tableRows).ToMarkdown())
return $sb.ToString()
}
[String] RenderCategory([String[]] $Headers, [Boolean] $AddLineSeparator) {
# Always skip the first header because it is "Installed Software"
[String[]] $takeHeaders = $Headers | Select-Object -Skip 1
if ($takeHeaders.Count -eq 0) {
return ""
}
$lineSeparator = $AddLineSeparator ? "<br>": ""
return [String]::Join(" >$lineSeparator ", $takeHeaders)
}
[String] RenderToolName([String] $ToolName) {
return $ToolName.TrimEnd(":")
}
[String] StrikeTableRow([String] $Row) {
# Convert "a|b|c" to "~~a~~|~~b~~|~~c~~
$cells = $Row.Split("|")
$strikedCells = $cells | ForEach-Object { "~~$($_)~~"}
return [String]::Join("|", $strikedCells)
}
}
# Temporary structure to store the single difference between two reports
class ReportDifferenceItem {
[BaseNode] $PreviousReportNode
[BaseNode] $CurrentReportNode
[String[]] $Headers
ReportDifferenceItem([BaseNode] $PreviousReportNode, [BaseNode] $CurrentReportNode, [String[]] $Headers) {
$this.PreviousReportNode = $PreviousReportNode
$this.CurrentReportNode = $CurrentReportNode
$this.Headers = $Headers
}
[Boolean] IsBaseToolNode() {
$node = $this.CurrentReportNode ?? $this.PreviousReportNode
return $node -is [BaseToolNode]
}
[Boolean] IsTableNode() {
$node = $this.CurrentReportNode ?? $this.PreviousReportNode
return $node -is [TableNode]
}
}
@@ -1,429 +0,0 @@
using module ./SoftwareReport.BaseNodes.psm1
#########################################
### Nodes to describe image software ####
#########################################
# NodesFactory is used to simplify parsing different types of notes
# Every node has own logic of parsing and this method just invokes "FromJsonObject" of correct node type
class NodesFactory {
static [BaseNode] ParseNodeFromObject([object] $JsonObj) {
if ($JsonObj.NodeType -eq [HeaderNode].Name) {
return [HeaderNode]::FromJsonObject($JsonObj)
} elseif ($JsonObj.NodeType -eq [ToolVersionNode].Name) {
return [ToolVersionNode]::FromJsonObject($JsonObj)
} elseif ($JsonObj.NodeType -eq [ToolVersionsListNode].Name) {
return [ToolVersionsListNode]::FromJsonObject($JsonObj)
} elseif ($JsonObj.NodeType -eq [TableNode].Name) {
return [TableNode]::FromJsonObject($JsonObj)
} elseif ($JsonObj.NodeType -eq [NoteNode].Name) {
return [NoteNode]::FromJsonObject($JsonObj)
}
throw "Unknown node type in ParseNodeFromObject '$($JsonObj.NodeType)'"
}
}
class HeaderNode: BaseNode {
[ValidateNotNullOrEmpty()]
[String] $Title
[Collections.Generic.List[BaseNode]] $Children
HeaderNode([String] $Title) {
$this.Title = $Title
$this.Children = @()
}
[Boolean] ShouldBeIncludedToDiff() {
return $true
}
[void] AddNode([BaseNode] $node) {
$similarNode = $this.FindSimilarChildNode($node)
if ($similarNode) {
throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.`nFound node: $($similarNode.ToJsonObject() | ConvertTo-Json)`nNew node: $($node.ToJsonObject() | ConvertTo-Json)"
}
if (-not $this.IsNodeHasMarkdownHeader($node)) {
# If the node doesn't print own header to markdown, we should check that there is no other nodes that print header to markdown before it.
# It is done to avoid unexpected situation like this:
#
# HeaderNode A -> # A
# HeaderNode B -> ## B
# ToolVersionNode C -> - C
# ToolVersionNode D -> - D
#
# In this example, we add 'HeaderNode B" to 'HeaderNode A' and add 'ToolVersionNode C' to 'HeaderNode B'.
# Then we add 'ToolVersionNode D' to 'HeaderNode A'.
# But the result markdown will look like 'ToolVersionNode D' belongs to 'HeaderNode B' instead of 'HeaderNode A'.
$this.Children | Where-Object { $this.IsNodeHasMarkdownHeader($_) } | ForEach-Object {
throw "It is not allowed to add the non-header node after the header node. Consider adding the separate HeaderNode for this node"
}
}
$this.Children.Add($node)
}
[void] AddNodes([BaseNode[]] $nodes) {
$nodes | ForEach-Object {
$this.AddNode($_)
}
}
[HeaderNode] AddHeader([String] $Title) {
$node = [HeaderNode]::new($Title)
$this.AddNode($node)
return $node
}
[void] AddToolVersion([String] $ToolName, [String] $Version) {
$this.AddNode([ToolVersionNode]::new($ToolName, $Version))
}
[void] AddToolVersionsList([String] $ToolName, [String[]] $Version, [String] $MajorVersionRegex) {
$this.AddNode([ToolVersionsListNode]::new($ToolName, $Version, $MajorVersionRegex, "List"))
}
[void] AddToolVersionsListInline([String] $ToolName, [String[]] $Version, [String] $MajorVersionRegex) {
$this.AddNode([ToolVersionsListNode]::new($ToolName, $Version, $MajorVersionRegex, "Inline"))
}
[void] AddTable([PSCustomObject[]] $Table) {
$this.AddNode([TableNode]::FromObjectsArray($Table))
}
[void] AddNote([String] $Content) {
$this.AddNode([NoteNode]::new($Content))
}
[String] ToMarkdown([Int32] $Level) {
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine()
$sb.AppendLine("$("#" * $Level) $($this.Title)")
$this.Children | ForEach-Object {
$sb.AppendLine($_.ToMarkdown($Level + 1))
}
return $sb.ToString().TrimEnd()
}
[PSCustomObject] ToJsonObject() {
return [PSCustomObject]@{
NodeType = $this.GetType().Name
Title = $this.Title
Children = $this.Children | ForEach-Object { $_.ToJsonObject() }
}
}
static [HeaderNode] FromJsonObject([Object] $JsonObj) {
$node = [HeaderNode]::new($JsonObj.Title)
$JsonObj.Children | Where-Object { $_ } | ForEach-Object { $node.AddNode([NodesFactory]::ParseNodeFromObject($_)) }
return $node
}
[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
if ($OtherNode.GetType() -ne [HeaderNode]) {
return $false
}
return $this.Title -eq $OtherNode.Title
}
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
return $this.IsSimilarTo($OtherNode)
}
[BaseNode] FindSimilarChildNode([BaseNode] $Find) {
foreach ($childNode in $this.Children) {
if ($childNode.IsSimilarTo($Find)) {
return $childNode
}
}
return $null
}
hidden [Boolean] IsNodeHasMarkdownHeader([BaseNode] $node) {
if ($node -is [HeaderNode]) {
return $true
}
if (($node -is [ToolVersionsListNode]) -and ($node.ListType -eq "List")) {
return $true
}
return $false
}
}
class ToolVersionNode: BaseToolNode {
[ValidateNotNullOrEmpty()]
[String] $Version
ToolVersionNode([String] $ToolName, [String] $Version): base($ToolName) {
$this.Version = $Version
}
[String] ToMarkdown([Int32] $Level) {
return "- $($this.ToolName) $($this.Version)"
}
[String] GetValue() {
return $this.Version
}
[PSCustomObject] ToJsonObject() {
return [PSCustomObject]@{
NodeType = $this.GetType().Name
ToolName = $this.ToolName
Version = $this.Version
}
}
static [BaseNode] FromJsonObject([Object] $JsonObj) {
return [ToolVersionNode]::new($JsonObj.ToolName, $JsonObj.Version)
}
}
class ToolVersionsListNode: BaseToolNode {
[ValidateNotNullOrEmpty()]
[String[]] $Versions
[Regex] $MajorVersionRegex
[ValidateSet("List", "Inline")]
[String] $ListType
ToolVersionsListNode([String] $ToolName, [String[]] $Versions, [String] $MajorVersionRegex, [String] $ListType): base($ToolName) {
$this.Versions = $Versions
$this.MajorVersionRegex = [Regex]::new($MajorVersionRegex)
$this.ListType = $ListType
$this.ValidateMajorVersionRegex()
}
[String] ToMarkdown([Int32] $Level) {
if ($this.ListType -eq "Inline") {
return "- $($this.ToolName): $($this.Versions -join ', ')"
}
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine()
$sb.AppendLine("$("#" * $Level) $($this.ToolName)")
$this.Versions | ForEach-Object {
$sb.AppendLine("- $_")
}
return $sb.ToString().TrimEnd()
}
[String] GetValue() {
return $this.Versions -join ', '
}
[String] ExtractMajorVersion([String] $Version) {
$match = $this.MajorVersionRegex.Match($Version)
if (($match.Success -ne $true) -or [String]::IsNullOrEmpty($match.Groups[0].Value)) {
throw "Version '$Version' doesn't match regex '$($this.PrimaryVersionRegex)'"
}
return $match.Groups[0].Value
}
[PSCustomObject] ToJsonObject() {
return [PSCustomObject]@{
NodeType = $this.GetType().Name
ToolName = $this.ToolName
Versions = $this.Versions
MajorVersionRegex = $this.MajorVersionRegex.ToString()
ListType = $this.ListType
}
}
static [ToolVersionsListNode] FromJsonObject([Object] $JsonObj) {
return [ToolVersionsListNode]::new($JsonObj.ToolName, $JsonObj.Versions, $JsonObj.MajorVersionRegex, $JsonObj.ListType)
}
hidden [void] ValidateMajorVersionRegex() {
$this.Versions | Group-Object { $this.ExtractMajorVersion($_) } | ForEach-Object {
if ($_.Count -gt 1) {
throw "Multiple versions from list '$($this.GetValue())' return the same result from regex '$($this.MajorVersionRegex)': $($_.Name)"
}
}
}
}
class TableNode: BaseNode {
# It is easier to store the table as rendered lines because it will simplify finding differences in rows later
[ValidateNotNullOrEmpty()]
[String] $Headers
[ValidateNotNullOrEmpty()]
[String[]] $Rows
TableNode([String] $Headers, [String[]] $Rows) {
$this.Headers = $Headers
$this.Rows = $Rows
$columnsCount = $this.Headers.Split("|").Count
$this.Rows | ForEach-Object {
if ($_.Split("|").Count -ne $columnsCount) {
throw "Table has different number of columns in different rows"
}
}
}
[Boolean] ShouldBeIncludedToDiff() {
return $true
}
[String] ToMarkdown([Int32] $Level) {
$maxColumnWidths = $this.CalculateColumnsWidth()
$columnsCount = $maxColumnWidths.Count
$delimeterLine = [String]::Join("|", @("-") * $columnsCount)
$sb = [System.Text.StringBuilder]::new()
@($this.Headers) + @($delimeterLine) + $this.Rows | ForEach-Object {
$sb.Append("|")
$row = $_.Split("|")
for ($colIndex = 0; $colIndex -lt $columnsCount; $colIndex++) {
$padSymbol = $row[$colIndex] -eq "-" ? "-" : " "
$cellContent = $row[$colIndex].PadRight($maxColumnWidths[$colIndex], $padSymbol)
$sb.Append(" $($cellContent) |")
}
$sb.AppendLine()
}
return $sb.ToString().TrimEnd()
}
hidden [Int32[]] CalculateColumnsWidth() {
$maxColumnWidths = $this.Headers.Split("|") | ForEach-Object { $_.Length }
$columnsCount = $maxColumnWidths.Count
$this.Rows | ForEach-Object {
$columnWidths = $_.Split("|") | ForEach-Object { $_.Length }
for ($colIndex = 0; $colIndex -lt $columnsCount; $colIndex++) {
$maxColumnWidths[$colIndex] = [Math]::Max($maxColumnWidths[$colIndex], $columnWidths[$colIndex])
}
}
return $maxColumnWidths
}
[PSCustomObject] ToJsonObject() {
return [PSCustomObject]@{
NodeType = $this.GetType().Name
Headers = $this.Headers
Rows = $this.Rows
}
}
static [TableNode] FromJsonObject([Object] $JsonObj) {
return [TableNode]::new($JsonObj.Headers, $JsonObj.Rows)
}
[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
if ($OtherNode.GetType() -ne [TableNode]) {
return $false
}
# We don't support having multiple TableNode instances on the same header level so such check is fine
return $true
}
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
if (-not $this.IsSimilarTo($OtherNode)) {
return $false
}
# We don't compare $this.Headers intentionally
# It is fine to ignore the tables where headers are changed but rows are not changed
if ($this.Rows.Count -ne $OtherNode.Rows.Count) {
return $false
}
for ($rowIndex = 0; $rowIndex -lt $this.Rows.Count; $rowIndex++) {
if ($this.Rows[$rowIndex] -ne $OtherNode.Rows[$rowIndex]) {
return $false
}
}
return $true
}
static [TableNode] FromObjectsArray([PSCustomObject[]] $Table) {
if ($Table.Count -eq 0) {
throw "Failed to create TableNode from empty objects array"
}
[String] $tableHeaders = [TableNode]::ArrayToTableRow($Table[0].PSObject.Properties.Name)
[Collections.Generic.List[String]] $tableRows = @()
$Table | ForEach-Object {
$rowHeaders = [TableNode]::ArrayToTableRow($_.PSObject.Properties.Name)
if (($rowHeaders -ne $tableHeaders)) {
throw "Failed to create TableNode from objects array because objects have different properties"
}
$tableRows.Add([TableNode]::ArrayToTableRow($_.PSObject.Properties.Value))
}
return [TableNode]::new($tableHeaders, $tableRows)
}
hidden static [String] ArrayToTableRow([String[]] $Values) {
if ($Values.Count -eq 0) {
throw "Failed to create TableNode because some objects are empty"
}
$Values | ForEach-Object {
if ($_.Contains("|")) {
throw "Failed to create TableNode because some cells '$_' contains forbidden symbol '|'"
}
}
return [String]::Join("|", $Values)
}
}
class NoteNode: BaseNode {
[ValidateNotNullOrEmpty()]
[String] $Content
NoteNode([String] $Content) {
$this.Content = $Content
}
[String] ToMarkdown([Int32] $Level) {
return @(
'```',
$this.Content,
'```'
) -join "`n"
}
[PSCustomObject] ToJsonObject() {
return [PSCustomObject]@{
NodeType = $this.GetType().Name
Content = $this.Content
}
}
static [NoteNode] FromJsonObject([Object] $JsonObj) {
return [NoteNode]::new($JsonObj.Content)
}
[Boolean] IsSimilarTo([BaseNode] $OtherNode) {
if ($OtherNode.GetType() -ne [NoteNode]) {
return $false
}
return $this.Content -eq $OtherNode.Content
}
[Boolean] IsIdenticalTo([BaseNode] $OtherNode) {
return $this.IsSimilarTo($OtherNode)
}
}
@@ -1,34 +0,0 @@
using module ./SoftwareReport.BaseNodes.psm1
using module ./SoftwareReport.Nodes.psm1
class SoftwareReport {
[ValidateNotNullOrEmpty()]
[HeaderNode] $Root
SoftwareReport([String] $Title) {
$this.Root = [HeaderNode]::new($Title)
}
SoftwareReport([HeaderNode] $Root) {
$this.Root = $Root
}
[String] ToJson() {
return $this.Root.ToJsonObject() | ConvertTo-Json -Depth 10
}
static [SoftwareReport] FromJson([String] $JsonString) {
$jsonObj = $JsonString | ConvertFrom-Json
$rootNode = [NodesFactory]::ParseNodeFromObject($jsonObj)
return [SoftwareReport]::new($rootNode)
}
[String] ToMarkdown() {
return $this.Root.ToMarkdown().Trim()
}
[String] GetImageVersion() {
$imageVersionNode = $this.Root.Children ?? @() | Where-Object { ($_ -is [ToolVersionNode]) -and ($_.ToolName -eq "Image Version:") } | Select-Object -First 1
return $imageVersionNode.Version ?? "Unknown version"
}
}
@@ -1,558 +0,0 @@
using module ../SoftwareReport.psm1
using module ../SoftwareReport.DifferenceCalculator.psm1
Describe "Comparer.E2E" {
It "Some tools are updated" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevTools = $prevInstalledSoftware.AddHeader("Tools")
$prevTools.AddToolVersion("ToolWillBeUpdated1", "1.0.0")
$prevTools.AddToolVersion("ToolWillBeUpdated2", "3.0.1")
$prevTools.AddToolVersionsList("ToolWillBeUpdated3", @("14.0.0", "15.5.1"), "^\d+")
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.1")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextTools = $nextInstalledSoftware.AddHeader("Tools")
$nextTools.AddToolVersion("ToolWillBeUpdated1", "2.5.0")
$nextTools.AddToolVersion("ToolWillBeUpdated2", "3.0.2")
$nextTools.AddToolVersionsList("ToolWillBeUpdated3", @("14.2.0", "15.5.1"), "^\d+")
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- OS Version: macOS 11.7.1 (20G817)
- Image Version: 20220922.1
## :mega: What's changed?
### Updated
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Previous (20220918.1)</th>
<th>Current (20220922.1)</th>
</thead>
<tbody>
<tr>
<td rowspan="3">Tools</td>
<td>ToolWillBeUpdated1</td>
<td>1.0.0</td>
<td>2.5.0</td>
</tr>
<tr>
<td>ToolWillBeUpdated2</td>
<td>3.0.1</td>
<td>3.0.2</td>
</tr>
<tr>
<td>ToolWillBeUpdated3</td>
<td>14.0.0</td>
<td>14.2.0</td>
</tr>
</tbody>
</table>
'@
}
It "Some tools are updated, added and removed" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevLanguagesAndRuntimes = $prevInstalledSoftware.AddHeader("Language and Runtime")
$prevLanguagesAndRuntimes.AddToolVersion("ToolWillBeRemoved", "5.1.16(1)-release")
$prevLanguagesAndRuntimes.AddToolVersionsListInline("ToolWithMultipleVersions3", @("1.2.100", "1.2.200", "1.3.500", "1.4.100", "1.4.200"), "^\d+\.\d+\.\d")
$prevLanguagesAndRuntimes.AddToolVersion("ToolWithoutChanges", "5.34.0")
$prevLanguagesAndRuntimes.AddToolVersion("ToolWillBeUpdated", "8.1.0")
$prevCachedTools = $prevInstalledSoftware.AddHeader("Cached Tools")
$prevCachedTools.AddToolVersionsList("ToolWithMultipleVersions1", @("2.7.3", "2.8.1", "3.1.2"), "^\d+\.\d+")
$prevCachedTools.AddToolVersionsList("ToolWithMultipleVersions2", @("14.8.0", "15.1.0", "16.4.2"), "^\d+")
$prevSQLSection = $prevInstalledSoftware.AddHeader("Databases")
$prevSQLSection.AddToolVersion("MineSQL", "6.1.0")
$prevSQLSection.AddNote("First Note")
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.2 (20G922)")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.0")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextLanguagesAndRuntimes = $nextInstalledSoftware.AddHeader("Language and Runtime")
$nextLanguagesAndRuntimes.AddToolVersion("ToolWillBeAdded", "16.18.0")
$nextLanguagesAndRuntimes.AddToolVersionsListInline("ToolWithMultipleVersions3", @("1.2.200", "1.3.515", "1.4.100", "1.4.200", "1.5.800"), "^\d+\.\d+\.\d")
$nextLanguagesAndRuntimes.AddToolVersion("ToolWithoutChanges", "5.34.0")
$nextLanguagesAndRuntimes.AddToolVersion("ToolWillBeUpdated", "8.3.0")
$nextCachedTools = $nextInstalledSoftware.AddHeader("Cached Tools")
$nextCachedTools.AddToolVersionsList("ToolWithMultipleVersions1", @("2.7.3", "2.8.1", "3.1.2"), "^\d+\.\d+")
$nextCachedTools.AddToolVersionsList("ToolWithMultipleVersions2", @("15.1.0", "16.4.2", "17.0.1"), "^\d+")
$nextSQLSection = $nextInstalledSoftware.AddHeader("Databases")
$nextSQLSection.AddToolVersion("MineSQL", "6.1.1")
$nextSQLSection.AddNote("Second Note")
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- OS Version: macOS 11.7.2 (20G922)
- Image Version: 20220922.0
## :mega: What's changed?
### Added :heavy_plus_sign:
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Current (20220922.0)</th>
</thead>
<tbody>
<tr>
<td rowspan="2">Language and Runtime</td>
<td>ToolWillBeAdded</td>
<td>16.18.0</td>
</tr>
<tr>
<td>ToolWithMultipleVersions3</td>
<td>1.5.800</td>
</tr>
<tr>
<td rowspan="1">Cached Tools</td>
<td>ToolWithMultipleVersions2</td>
<td>17.0.1</td>
</tr>
</tbody>
</table>
### Deleted :heavy_minus_sign:
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Previous (20220918.1)</th>
</thead>
<tbody>
<tr>
<td rowspan="2">Language and Runtime</td>
<td>ToolWithMultipleVersions3</td>
<td>1.2.100</td>
</tr>
<tr>
<td>ToolWillBeRemoved</td>
<td>5.1.16(1)-release</td>
</tr>
<tr>
<td rowspan="1">Cached Tools</td>
<td>ToolWithMultipleVersions2</td>
<td>14.8.0</td>
</tr>
</tbody>
</table>
### Updated
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Previous (20220918.1)</th>
<th>Current (20220922.0)</th>
</thead>
<tbody>
<tr>
<td rowspan="1"></td>
<td>OS Version</td>
<td>macOS 11.7.1 (20G817)</td>
<td>macOS 11.7.2 (20G922)</td>
</tr>
<tr>
<td rowspan="2">Language and Runtime</td>
<td>ToolWithMultipleVersions3</td>
<td>1.3.500</td>
<td>1.3.515</td>
</tr>
<tr>
<td>ToolWillBeUpdated</td>
<td>8.1.0</td>
<td>8.3.0</td>
</tr>
<tr>
<td rowspan="1">Databases</td>
<td>MineSQL</td>
<td>6.1.0</td>
<td>6.1.1</td>
</tr>
</tbody>
</table>
'@
}
It "Header tree changes" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevInstalledSoftware.AddToolVersion("ToolWithoutChanges", "5.34.0")
$prevInstalledSoftware.AddHeader("HeaderWillBeRemoved").AddHeader("SubheaderWillBeRemoved").AddToolVersion("ToolWillBeRemoved", "1.0.0")
$prevInstalledSoftware.AddHeader("Header1").AddToolVersion("ToolWillBeMovedToAnotherHeader", "3.0.0")
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.0")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextInstalledSoftware.AddToolVersion("ToolWithoutChanges", "5.34.0")
$nextInstalledSoftware.AddHeader("HeaderWillBeAdded").AddHeader("SubheaderWillBeAdded").AddToolVersion("ToolWillBeAdded", "5.0.0")
$nextInstalledSoftware.AddHeader("Header2").AddToolVersion("ToolWillBeMovedToAnotherHeader", "3.0.0")
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- Image Version: 20220922.0
## :mega: What's changed?
### Added :heavy_plus_sign:
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Current (20220922.0)</th>
</thead>
<tbody>
<tr>
<td rowspan="1">HeaderWillBeAdded ><br> SubheaderWillBeAdded</td>
<td>ToolWillBeAdded</td>
<td>5.0.0</td>
</tr>
<tr>
<td rowspan="1">Header2</td>
<td>ToolWillBeMovedToAnotherHeader</td>
<td>3.0.0</td>
</tr>
</tbody>
</table>
### Deleted :heavy_minus_sign:
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Previous (20220918.1)</th>
</thead>
<tbody>
<tr>
<td rowspan="1">HeaderWillBeRemoved ><br> SubheaderWillBeRemoved</td>
<td>ToolWillBeRemoved</td>
<td>1.0.0</td>
</tr>
<tr>
<td rowspan="1">Header1</td>
<td>ToolWillBeMovedToAnotherHeader</td>
<td>3.0.0</td>
</tr>
</tbody>
</table>
'@
}
It "Tables are added and removed" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevInstalledSoftware.AddHeader("HeaderWillExist").AddTable(@(
[PSCustomObject]@{TableInExistingHeaderWillBeRemoved = "Q"; Value = "25"},
[PSCustomObject]@{TableInExistingHeaderWillBeRemoved = "O"; Value = "24"}
))
$prevTools = $prevInstalledSoftware.AddHeader("Tools")
$prevTools.AddHeader("HeaderWillBeRemoved").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "Z"; Value = "30"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "W"; Value = "29"}
))
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.1")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextInstalledSoftware.AddHeader("HeaderWillExist")
$nextTools = $nextInstalledSoftware.AddHeader("Tools")
$nextTools.AddToolVersion("ToolWillBeAdded", "3.0.1")
$nextTools.AddTable(@(
[PSCustomObject]@{NewTableInExistingHeader = "A"; Value = "1"},
[PSCustomObject]@{NewTableInExistingHeader = "B"; Value = "2"}
))
$nextTools.AddHeader("NewHeaderWithTable").AddTable(@(
[PSCustomObject]@{NewTableInNewHeader = "C"; Value = "3"},
[PSCustomObject]@{NewTableInNewHeader = "D"; Value = "4"}
))
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- Image Version: 20220922.1
## :mega: What's changed?
### Added :heavy_plus_sign:
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Current (20220922.1)</th>
</thead>
<tbody>
<tr>
<td rowspan="1">Tools</td>
<td>ToolWillBeAdded</td>
<td>3.0.1</td>
</tr>
</tbody>
</table>
#### Tools
| NewTableInExistingHeader | Value |
| ------------------------ | ----- |
| A | 1 |
| B | 2 |
#### Tools > NewHeaderWithTable
| NewTableInNewHeader | Value |
| ------------------- | ----- |
| C | 3 |
| D | 4 |
### Deleted :heavy_minus_sign:
#### HeaderWillExist
| TableInExistingHeaderWillBeRemoved | Value |
| ---------------------------------- | ------ |
| ~~Q~~ | ~~25~~ |
| ~~O~~ | ~~24~~ |
#### Tools > HeaderWillBeRemoved
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ------ |
| ~~Z~~ | ~~30~~ |
| ~~W~~ | ~~29~~ |
'@
}
It "Tables are changed" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevTools = $prevInstalledSoftware.AddHeader("Tools")
$prevTools.AddHeader("TableWithAddedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "AA"; Value = "10"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "AB"; Value = "11"}
))
$prevTools.AddHeader("TableWithRemovedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "BA"; Value = "32"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "BB"; Value = "33"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "BC"; Value = "34"}
))
$prevTools.AddHeader("TableWithUpdatedRow").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CA"; Value = "42"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CB"; Value = "43"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CC"; Value = "44"}
))
$prevTools.AddHeader("TableWithUpdatedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DA"; Value = "50"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DB"; Value = "51"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DC"; Value = "52"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DD"; Value = "53"}
))
$prevTools.AddHeader("TableWithComplexChanges").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EA"; Value = "62"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EB"; Value = "63"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EC"; Value = "64"}
[PSCustomObject]@{TableWillBeRemovedWithHeader = "ED"; Value = "65"}
))
$prevTools.AddHeader("TableWithOnlyHeaderChanged").AddTable(@(
[PSCustomObject]@{TableWithOnlyHeaderChanged = "FA"; Value = "72"},
[PSCustomObject]@{TableWithOnlyHeaderChanged = "FB"; Value = "73"}
))
$prevTools.AddHeader("TableWithHeaderAndRowsChanges").AddTable(@(
[PSCustomObject]@{TableWithHeaderAndRowsChanges = "GA"; Value = "82"},
[PSCustomObject]@{TableWithHeaderAndRowsChanges = "GB"; Value = "83"},
[PSCustomObject]@{TableWithHeaderAndRowsChanges = "GC"; Value = "84"}
))
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.1")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextTools = $nextInstalledSoftware.AddHeader("Tools")
$nextTools.AddHeader("TableWithAddedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "AA"; Value = "10"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "AB"; Value = "11"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "AC"; Value = "12"}
))
$nextTools.AddHeader("TableWithRemovedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "BB"; Value = "33"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "BC"; Value = "34"}
))
$nextTools.AddHeader("TableWithUpdatedRow").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CA"; Value = "42"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CB"; Value = "500"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "CC"; Value = "44"}
))
$nextTools.AddHeader("TableWithUpdatedRows").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DA"; Value = "50"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DB"; Value = "5100"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DC"; Value = "5200"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "DD"; Value = "53"}
))
$nextTools.AddHeader("TableWithComplexChanges").AddTable(@(
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EB"; Value = "63"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EC"; Value = "640"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "ED"; Value = "65"},
[PSCustomObject]@{TableWillBeRemovedWithHeader = "EE"; Value = "66"}
))
$nextTools.AddHeader("TableWithOnlyHeaderChanged").AddTable(@(
[PSCustomObject]@{TableWithOnlyHeaderChanged2 = "FA"; Value = "72"},
[PSCustomObject]@{TableWithOnlyHeaderChanged2 = "FB"; Value = "73"}
))
$nextTools.AddHeader("TableWithHeaderAndRowsChanges").AddTable(@(
[PSCustomObject]@{TableWithHeaderAndRowsChanges2 = "GA"; Value = "82"},
[PSCustomObject]@{TableWithHeaderAndRowsChanges2 = "GE"; Value = "850"},
[PSCustomObject]@{TableWithHeaderAndRowsChanges2 = "GC"; Value = "840"}
))
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- Image Version: 20220922.1
## :mega: What's changed?
### Added :heavy_plus_sign:
#### Tools > TableWithAddedRows
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ----- |
| AC | 12 |
#### Tools > TableWithHeaderAndRowsChanges
| TableWithHeaderAndRowsChanges2 | Value |
| ------------------------------ | ----- |
| GA | 82 |
| GE | 850 |
| GC | 840 |
### Deleted :heavy_minus_sign:
#### Tools > TableWithRemovedRows
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ------ |
| ~~BA~~ | ~~32~~ |
#### Tools > TableWithHeaderAndRowsChanges
| TableWithHeaderAndRowsChanges | Value |
| ----------------------------- | ------ |
| ~~GA~~ | ~~82~~ |
| ~~GB~~ | ~~83~~ |
| ~~GC~~ | ~~84~~ |
### Updated
#### Tools > TableWithUpdatedRow
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ------ |
| ~~CB~~ | ~~43~~ |
| CB | 500 |
#### Tools > TableWithUpdatedRows
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ------ |
| ~~DB~~ | ~~51~~ |
| ~~DC~~ | ~~52~~ |
| DB | 5100 |
| DC | 5200 |
#### Tools > TableWithComplexChanges
| TableWillBeRemovedWithHeader | Value |
| ---------------------------- | ------ |
| ~~EA~~ | ~~62~~ |
| ~~EC~~ | ~~64~~ |
| EC | 640 |
| EE | 66 |
'@
}
It "Reports are identical" {
# Previous report
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
$prevSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
$prevTools = $prevInstalledSoftware.AddHeader("Tools")
$prevTools.AddToolVersion("ToolA", "1.0.0")
$prevTools.AddToolVersion("ToolB", "3.0.1")
# Next report
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
$nextSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.1")
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
$nextTools = $nextInstalledSoftware.AddHeader("Tools")
$nextTools.AddToolVersion("ToolA", "1.0.0")
$nextTools.AddToolVersion("ToolB", "3.0.1")
# Compare reports
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
$comparer.CompareReports()
$comparer.GetMarkdownReport() | Should -BeExactly @'
# :desktop_computer: Actions Runner Image: macOS 11
- OS Version: macOS 11.7.1 (20G817)
- Image Version: 20220922.1
## :mega: What's changed?
'@
}
}
@@ -1,603 +0,0 @@
using module ../SoftwareReport.Nodes.psm1
using module ../SoftwareReport.DifferenceCalculator.psm1
BeforeDiscovery {
Import-Module $(Join-Path $PSScriptRoot "TestHelpers.psm1") -DisableNameChecking
}
Describe "Comparer.UnitTests" {
Describe "Headers Tree" {
It "Add Node to existing header" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersion("MyTool1", "2.1.3")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Version | Should -Be "2.1.3"
$comparer.AddedItems[0].Headers | Should -BeArray @("MyHeader")
}
It "Add new header with Node" {
$prevReport = [HeaderNode]::new("Version 1")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddHeader("MySubHeader").AddToolVersion("MyTool1", "2.1.3")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Version | Should -Be "2.1.3"
$comparer.AddedItems[0].Headers | Should -BeArray @("MyHeader", "MySubHeader")
}
It "Remove Node from existing header" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
$comparer.DeletedItems[0].Headers | Should -BeArray @("MyHeader")
}
It "Remove header with Node" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
$comparer.DeletedItems[0].Headers | Should -BeArray @("MyHeader", "MySubheader")
}
It "Node with minor changes" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.4")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Version | Should -Be "2.1.4"
$comparer.ChangedItems[0].Headers | Should -BeArray @("MyHeader", "MySubHeader")
}
It "Node without changes" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.3")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
}
It "Node is moved to different header" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddHeader("MySubheader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddHeader("MySubheader2").AddToolVersion("MyTool1", "2.1.3")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Version | Should -Be "2.1.3"
$comparer.AddedItems[0].Headers | Should -BeArray @("MyHeader", "MySubheader2")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
$comparer.DeletedItems[0].Headers | Should -BeArray @("MyHeader", "MySubheader")
}
It "Complex structure" {
$prevReport = [HeaderNode]::new("Version 1")
$prevSubHeader = $prevReport.AddHeader("MyHeader").AddHeader("MySubheader")
$prevSubHeader.AddToolVersion("MyTool1", "2.1.3")
$prevSubHeader.AddHeader("MySubSubheader").AddToolVersion("MyTool2", "2.9.1")
$prevReport.AddHeader("MyHeader2")
$prevReport.AddHeader("MyHeader3").AddHeader("MySubheader3").AddToolVersion("MyTool3", "14.2.1")
$nextReport = [HeaderNode]::new("Version 2")
$nextSubHeader = $nextReport.AddHeader("MyHeader").AddHeader("MySubheader")
$nextSubHeader.AddToolVersion("MyTool1", "2.1.4")
$nextSubSubHeader = $nextSubHeader.AddHeader("MySubSubheader")
$nextSubSubHeader.AddToolVersion("MyTool2", "2.9.1")
$nextSubSubHeader.AddToolVersion("MyTool4", "2.7.6")
$nextReport.AddHeader("MyHeader2")
$nextReport.AddHeader("MyHeader3")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool4"
$comparer.AddedItems[0].CurrentReportNode.Version | Should -Be "2.7.6"
$comparer.AddedItems[0].Headers | Should -BeArray @("MyHeader", "MySubheader", "MySubSubheader")
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Version | Should -Be "2.1.4"
$comparer.ChangedItems[0].Headers | Should -BeArray @("MyHeader", "MySubheader")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool3"
$comparer.DeletedItems[0].PreviousReportNode.Version | Should -Be "14.2.1"
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
$comparer.DeletedItems[0].Headers | Should -BeArray @("MyHeader3", "MySubheader3")
}
}
Describe "ToolVersionNode" {
It "ToolVersionNode is updated" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersion("MyTool1", "2.1.3")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersion("MyTool1", "2.1.4")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Version | Should -Be "2.1.3"
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Version | Should -Be "2.1.4"
$comparer.ChangedItems[0].Headers | Should -BeArray @("MyHeader")
}
}
Describe "ToolVersionsListNode" {
It "Single version is not changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3"), "^.+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3"), "^.+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
}
It "Single version is changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3"), "^\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.4"), "^\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Versions | Should -BeArray @("2.1.3")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Versions | Should -BeArray @("2.1.4")
}
It "Major version is added" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3"), "^\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3", "3.1.4"), "^\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Versions | Should -BeArray @("3.1.4")
}
It "Major version is removed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3", "3.1.4"), "^\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("3.1.4"), "^\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Versions | Should -BeArray @("2.1.3")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
}
It "Major version is changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("3.1.4"), "^\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("3.2.0"), "^\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Versions | Should -BeArray @("3.1.4")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Versions | Should -BeArray @("3.2.0")
}
It "Major version is added, removed and updated at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("1.0.0", "2.1.3", "3.1.4", "4.0.2"), "^\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.1.3", "3.2.0", "4.0.2", "5.1.0"), "^\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Versions | Should -BeArray @("5.1.0")
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Versions | Should -BeArray @("3.1.4")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Versions | Should -BeArray @("3.2.0")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Versions | Should -BeArray @("1.0.0")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
}
It "Minor version is added, removed and updated at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.3.8", "2.4.9", "2.5.3", "2.6.0", "2.7.4", "2.8.0"), "^\d+\.\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.5.3", "2.6.2", "2.7.5", "2.8.0", "2.9.2", "2.10.3"), "^\d+\.\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Versions | Should -BeArray @("2.9.2", "2.10.3")
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].PreviousReportNode.Versions | Should -BeArray @("2.6.0", "2.7.4")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.ChangedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.ChangedItems[0].CurrentReportNode.Versions | Should -BeArray @("2.6.2", "2.7.5")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Versions | Should -BeArray @("2.3.8", "2.4.9")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
}
It "Patch version is added, removed and updated at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.3.8", "2.4.9", "2.5.3", "2.6.0", "2.7.4"), "^\d+\.\d+\.\d+")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddToolVersionsList("MyTool1", @("2.4.9", "2.5.4", "2.6.0", "2.7.5", "2.8.2"), "^\d+\.\d+\.\d+")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.AddedItems[0].CurrentReportNode.ToolName | Should -Be "MyTool1"
$comparer.AddedItems[0].CurrentReportNode.Versions | Should -BeArray @("2.5.4", "2.7.5", "2.8.2")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([ToolVersionsListNode])
$comparer.DeletedItems[0].PreviousReportNode.ToolName | Should -Be "MyTool1"
$comparer.DeletedItems[0].PreviousReportNode.Versions | Should -BeArray @("2.3.8", "2.5.3", "2.7.4")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
}
}
Describe "TableNode" {
It "Rows are added" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2", "C1|C2", "D1|D2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
$comparer.AddedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.AddedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.AddedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2")
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.AddedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value"
$comparer.AddedItems[0].CurrentReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2", "C1|C2", "D1|D2")
}
It "Rows are deleted" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2", "C1|C2", "D1|D2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("C1|C2", "D1|D2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.DeletedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.DeletedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2", "C1|C2", "D1|D2")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.DeletedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value"
$comparer.DeletedItems[0].CurrentReportNode.Rows | Should -BeArray @("C1|C2", "D1|D2")
}
It "Rows are changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B3|B4")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].CurrentReportNode.Rows | Should -BeArray @("A1|A2", "B3|B4")
}
It "Rows are changed and updated at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B3|B4", "C1|C2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].CurrentReportNode.Rows | Should -BeArray @("A1|A2", "B3|B4", "C1|C2")
}
It "Rows are changed and removed at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2", "C1|C2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B3|B4")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 1
$comparer.DeletedItems | Should -HaveCount 0
$comparer.ChangedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2", "C1|C2")
$comparer.ChangedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.ChangedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value"
$comparer.ChangedItems[0].CurrentReportNode.Rows | Should -BeArray @("A1|A2", "B3|B4")
}
It "Rows are not changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
}
It "Rows are not changed but header is changed" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value2", @("A1|A2", "B1|B2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
}
It "Rows are changed and header is changed at the same time" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value", @("A1|A2", "B1|B2")))
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddHeader("MyHeader").AddNode([TableNode]::new("Name|Value2", @("A1|A2", "B1|B2", "C1|C2")))
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 1
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 1
$comparer.AddedItems[0].PreviousReportNode | Should -BeNullOrEmpty
$comparer.AddedItems[0].CurrentReportNode | Should -BeOfType ([TableNode])
$comparer.AddedItems[0].CurrentReportNode.Headers | Should -Be "Name|Value2"
$comparer.AddedItems[0].CurrentReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2", "C1|C2")
$comparer.DeletedItems[0].PreviousReportNode | Should -BeOfType ([TableNode])
$comparer.DeletedItems[0].PreviousReportNode.Headers | Should -Be "Name|Value"
$comparer.DeletedItems[0].PreviousReportNode.Rows | Should -BeArray @("A1|A2", "B1|B2")
$comparer.DeletedItems[0].CurrentReportNode | Should -BeNullOrEmpty
}
}
Describe "NoteNode" {
It "NoteNode is ignored from report" {
$prevReport = [HeaderNode]::new("Version 1")
$prevReport.AddNote("MyFirstNote")
$prevReport.AddHeader("MyFirstHeader").AddNote("MyFirstSubNote")
$nextReport = [HeaderNode]::new("Version 2")
$nextReport.AddNote("MySecondNote")
$nextReport.AddHeader("MySecondHeader").AddNote("MySecondSubNote")
$comparer = [SoftwareReportDifferenceCalculator]::new($prevReport, $nextReport)
$comparer.CompareReports()
$comparer.AddedItems | Should -HaveCount 0
$comparer.ChangedItems | Should -HaveCount 0
$comparer.DeletedItems | Should -HaveCount 0
}
}
}
@@ -1,291 +0,0 @@
using module ../SoftwareReport.Nodes.psm1
using module ../SoftwareReport.DifferenceRender.psm1
BeforeDiscovery {
Import-Module $(Join-Path $PSScriptRoot "TestHelpers.psm1") -DisableNameChecking
}
Describe "ComparerReport.UnitTests" {
BeforeAll {
$script:DifferenceRender = [SoftwareReportDifferenceRender]::new()
}
Context "CalculateHtmlTableRowSpan" {
It "Without the equal cells" {
$table = @(
[PSCustomObject]@{ Key = "A"; Value = "1" }
[PSCustomObject]@{ Key = "B"; Value = "2" }
[PSCustomObject]@{ Key = "C"; Value = "3" }
)
$actual = $DifferenceRender.CalculateHtmlTableRowSpan($table, "Key")
$actual | Should -BeArray @(1, 1, 1)
}
It "Only equal cells" {
$table = @(
[PSCustomObject]@{ Key = "A"; Value = "D" }
[PSCustomObject]@{ Key = "B"; Value = "D" }
[PSCustomObject]@{ Key = "C"; Value = "D" }
)
$actual = $DifferenceRender.CalculateHtmlTableRowSpan($table, "Value")
$actual | Should -BeArray @(3, 0, 0)
}
It "Single row" {
$table = @(
[PSCustomObject]@{ Key = "A"; Value = "1" }
)
$actual = $DifferenceRender.CalculateHtmlTableRowSpan($table, "Key")
$actual | Should -BeArray @(1)
}
It "Different cells" {
$table = @(
[PSCustomObject]@{ Key = "A"; Value = "1" }
[PSCustomObject]@{ Key = "B"; Value = "2" }
[PSCustomObject]@{ Key = "B"; Value = "3" }
[PSCustomObject]@{ Key = "C"; Value = "4" }
[PSCustomObject]@{ Key = "C"; Value = "5" }
[PSCustomObject]@{ Key = "C"; Value = "6" }
[PSCustomObject]@{ Key = "D"; Value = "7" }
[PSCustomObject]@{ Key = "E"; Value = "8" }
[PSCustomObject]@{ Key = "E"; Value = "9" }
[PSCustomObject]@{ Key = "F"; Value = "10" }
)
$actual = $DifferenceRender.CalculateHtmlTableRowSpan($table, "Key")
$actual | Should -BeArray @(1, 2, 0, 3, 0, 0, 1, 2, 0, 1)
}
}
Context "RenderCategory" {
It "With line separator" {
$actual = $DifferenceRender.RenderCategory(@("Header 1", "Header 2", "Header 3"), $true)
$actual | Should -Be "Header 2 ><br> Header 3"
}
It "Without line separator" {
$actual = $DifferenceRender.RenderCategory(@("Header 1", "Header 2", "Header 3"), $false)
$actual | Should -Be "Header 2 > Header 3"
}
It "One header" {
$actual = $DifferenceRender.RenderCategory(@("Header 1"), $false)
$actual | Should -Be ""
}
It "Empty headers" {
$actual = $DifferenceRender.RenderCategory(@(), $false)
$actual | Should -Be ""
}
}
Context "RenderToolName" {
It "Clear tool name" {
$actual = $DifferenceRender.RenderToolName("My Tool 1")
$actual | Should -Be "My Tool 1"
}
It "Name with colon symbol" {
$actual = $DifferenceRender.RenderToolName("My Tool 1:")
$actual | Should -Be "My Tool 1"
}
}
Context "StrikeTableRow" {
It "Simple row" {
$actual = $DifferenceRender.StrikeTableRow("Test1|Test2|Test3")
$actual | Should -Be "~~Test1~~|~~Test2~~|~~Test3~~"
}
It "Row with spaces" {
$actual = $DifferenceRender.StrikeTableRow("Test 1|Test 2|Test 3")
$actual | Should -Be "~~Test 1~~|~~Test 2~~|~~Test 3~~"
}
}
Context "RenderHtmlTable" {
It "Simple table" {
$table = @(
[PSCustomObject]@{ "Category" = "A"; "Tool name" = "My Tool 1"; "Version" = "1.0" },
[PSCustomObject]@{ "Category" = "B"; "Tool name" = "My Tool 2"; "Version" = "2.0" },
[PSCustomObject]@{ "Category" = "C"; "Tool name" = "My Tool 3"; "Version" = "3.0" }
)
$renderedTable = $DifferenceRender.RenderHtmlTable($table, "Category")
$renderedTable | Should -Be @'
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Version</th>
</thead>
<tbody>
<tr>
<td rowspan="1">A</td>
<td>My Tool 1</td>
<td>1.0</td>
</tr>
<tr>
<td rowspan="1">B</td>
<td>My Tool 2</td>
<td>2.0</td>
</tr>
<tr>
<td rowspan="1">C</td>
<td>My Tool 3</td>
<td>3.0</td>
</tr>
</tbody>
</table>
'@
}
It "Table with the same category" {
$table = @(
[PSCustomObject]@{ "Category" = "A"; "Tool name" = "My Tool 1"; "Version" = "1.0" },
[PSCustomObject]@{ "Category" = "A"; "Tool name" = "My Tool 2"; "Version" = "2.0" },
[PSCustomObject]@{ "Category" = "A"; "Tool name" = "My Tool 3"; "Version" = "3.0" },
[PSCustomObject]@{ "Category" = "B"; "Tool name" = "My Tool 4"; "Version" = "4.0" }
)
$renderedTable = $DifferenceRender.RenderHtmlTable($table, "Category")
$renderedTable | Should -Be @'
<table>
<thead>
<th>Category</th>
<th>Tool name</th>
<th>Version</th>
</thead>
<tbody>
<tr>
<td rowspan="3">A</td>
<td>My Tool 1</td>
<td>1.0</td>
</tr>
<tr>
<td>My Tool 2</td>
<td>2.0</td>
</tr>
<tr>
<td>My Tool 3</td>
<td>3.0</td>
</tr>
<tr>
<td rowspan="1">B</td>
<td>My Tool 4</td>
<td>4.0</td>
</tr>
</tbody>
</table>
'@
}
}
Context "RenderTableNodesDiff" {
It "Add new table" {
$previousNode = $null
$currentNode = [TableNode]::new("Name|Value", @("A|1", "B|2"))
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ---- | ----- |
| A | 1 |
| B | 2 |
'@
}
It "Remove existing table" {
$previousNode = [TableNode]::new("Name|Value", @("A|1", "B|2"))
$currentNode = $null
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ----- | ----- |
| ~~A~~ | ~~1~~ |
| ~~B~~ | ~~2~~ |
'@
}
It "Add new rows to existing table" {
$previousNode = [TableNode]::new("Name|Value", @("A|1", "B|2"))
$currentNode = [TableNode]::new("Name|Value", @("A|1", "B|2", "C|3", "D|4"))
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ---- | ----- |
| C | 3 |
| D | 4 |
'@
}
It "Remove rows from existing table" {
$previousNode = [TableNode]::new("Name|Value", @("A|1", "B|2", "C|3", "D|4"))
$currentNode = [TableNode]::new("Name|Value", @("C|3", "D|4"))
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ----- | ----- |
| ~~A~~ | ~~1~~ |
| ~~B~~ | ~~2~~ |
'@
}
It "Row is changed in existing table" {
$previousNode = [TableNode]::new("Name|Value", @("A|1", "B|2"))
$currentNode = [TableNode]::new("Name|Value", @("A|1", "B|3"))
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ----- | ----- |
| ~~B~~ | ~~2~~ |
| B | 3 |
'@
}
It "Row is changed, added and removed at the same time in existing table" {
$previousNode = [TableNode]::new("Name|Value", @("A|1", "B|2", "C|3", "D|4"))
$currentNode = [TableNode]::new("Name|Value", @("B|2", "C|4", "D|4", "E|5"))
$reportItem = [ReportDifferenceItem]::new($previousNode, $currentNode, @("Header 1", "Header 2", "Header 3"))
$actual = $DifferenceRender.RenderTableNodesDiff($reportItem)
$actual | Should -Be @'
#### Header 2 > Header 3
| Name | Value |
| ----- | ----- |
| ~~A~~ | ~~1~~ |
| ~~C~~ | ~~3~~ |
| C | 4 |
| E | 5 |
'@
}
}
}
@@ -1,93 +0,0 @@
using module ../SoftwareReport.psm1
using module ../SoftwareReport.Nodes.psm1
Describe "SoftwareReport.E2E" {
Context "Report example 1" {
BeforeEach {
$softwareReport = [SoftwareReport]::new("macOS 11")
$softwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7 (20G817)")
$softwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
$languagesAndRuntimes = $installedSoftware.AddHeader("Language and Runtime")
$languagesAndRuntimes.AddToolVersion("Bash", "5.1.16(1)-release")
$languagesAndRuntimes.AddToolVersionsListInline(".NET Core SDK", @("1.2.100", "1.2.200", "3.1.414"), "^\d+\.\d+\.\d")
$languagesAndRuntimes.AddNode([ToolVersionNode]::new("Perl", "5.34.0"))
$cachedTools = $installedSoftware.AddHeader("Cached Tools")
$cachedTools.AddToolVersionsList("Ruby", @("2.7.3", "2.8.1", "3.1.2"), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("Node.js", @("14.8.0", "15.1.0", "16.4.2"), "^\d+")
$javaSection = $installedSoftware.AddHeader("Java")
$javaSection.AddTable(@(
[PSCustomObject] @{ Version = "8.0.125"; Vendor = "My Vendor"; "Environment Variable" = "JAVA_HOME_8_X64" },
[PSCustomObject] @{ Version = "11.3.103"; Vendor = "My Vendor"; "Environment Variable" = "JAVA_HOME_11_X64" }
))
$sqlSection = $installedSoftware.AddHeader("MySQL")
$sqlSection.AddToolVersion("MySQL", "6.1.0")
$sqlSection.AddNote("MySQL service is disabled by default.`nUse the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'")
$expectedMarkdown = @'
# macOS 11
- OS Version: macOS 11.7 (20G817)
- Image Version: 20220918.1
## Installed Software
### Language and Runtime
- Bash 5.1.16(1)-release
- .NET Core SDK: 1.2.100, 1.2.200, 3.1.414
- Perl 5.34.0
### Cached Tools
#### Ruby
- 2.7.3
- 2.8.1
- 3.1.2
#### Node.js
- 14.8.0
- 15.1.0
- 16.4.2
### Java
| Version | Vendor | Environment Variable |
| -------- | --------- | -------------------- |
| 8.0.125 | My Vendor | JAVA_HOME_8_X64 |
| 11.3.103 | My Vendor | JAVA_HOME_11_X64 |
### MySQL
- MySQL 6.1.0
```
MySQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
'@
}
It "ToMarkdown" {
$softwareReport.ToMarkdown() | Should -Be $expectedMarkdown
}
It "Serialization + Deserialization" {
$json = $softwareReport.ToJson()
$deserializedReport = [SoftwareReport]::FromJson($json)
$deserializedReport.ToMarkdown() | Should -Be $expectedMarkdown
}
}
Context "GetImageVersion" {
It "Image version exists" {
$softwareReport = [SoftwareReport]::new("MyReport")
$softwareReport.Root.AddToolVersion("Image Version:", "123.4")
$softwareReport.GetImageVersion() | Should -Be "123.4"
}
It "Empty report" {
$softwareReport = [SoftwareReport]::new("MyReport")
$softwareReport.GetImageVersion() | Should -Be "Unknown version"
}
}
}
@@ -1,511 +0,0 @@
using module ../SoftwareReport.Nodes.psm1
BeforeDiscovery {
Import-Module $(Join-Path $PSScriptRoot "TestHelpers.psm1") -DisableNameChecking
}
Describe "Nodes.UnitTests" {
Context "ToolVersionNode" {
It "ToMarkdown" {
$node = [ToolVersionNode]::new("MyTool", "2.1.3")
$node.ToMarkdown() | Should -Be "- MyTool 2.1.3"
}
It "GetValue" {
$node = [ToolVersionNode]::new("MyTool", "2.1.3")
$node.GetValue() | Should -Be "2.1.3"
}
It "Serialization" {
$node = [ToolVersionNode]::new("MyTool", "2.1.3")
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "ToolVersionNode"
$json.ToolName | Should -Be "MyTool"
$json.Version | Should -Be "2.1.3"
}
It "Deserialization" {
{ [ToolVersionNode]::FromJsonObject(@{ NodeType = "ToolVersionNode"; ToolName = ""; Version = "2.1.3" }) } | Should -Throw '*Exception setting "ToolName": "The argument is null or empty.*'
{ [ToolVersionNode]::FromJsonObject(@{ NodeType = "ToolVersionNode"; ToolName = "MyTool"; Version = "" }) } | Should -Throw '*Exception setting "Version": "The argument is null or empty.*'
{ [ToolVersionNode]::FromJsonObject(@{ NodeType = "ToolVersionNode"; ToolName = "MyTool"; Version = "2.1.3" }) } | Should -Not -Throw
}
It "Serialization + Deserialization" {
$node = [ToolVersionNode]::new("MyTool", "2.1.3")
$json = $node.ToJsonObject()
$node2 = [ToolVersionNode]::FromJsonObject($json)
$json2 = $node2.ToJsonObject()
$($json | ConvertTo-Json) | Should -Be $($json2 | ConvertTo-Json)
}
It "IsSimilarTo" {
[ToolVersionNode]::new("MyTool", "2.1.3").IsSimilarTo([ToolVersionNode]::new("MyTool", "2.1.3")) | Should -BeTrue
[ToolVersionNode]::new("MyTool", "2.1.3").IsSimilarTo([ToolVersionNode]::new("MyTool", "1.0.0")) | Should -BeTrue
[ToolVersionNode]::new("MyTool", "2.1.3").IsSimilarTo([ToolVersionNode]::new("MyTool2", "2.1.3")) | Should -BeFalse
}
It "IsIdenticalTo" {
[ToolVersionNode]::new("MyTool", "2.1.3").IsIdenticalTo([ToolVersionNode]::new("MyTool", "2.1.3")) | Should -BeTrue
[ToolVersionNode]::new("MyTool", "2.1.3").IsIdenticalTo([ToolVersionNode]::new("MyTool", "1.0.0")) | Should -BeFalse
[ToolVersionNode]::new("MyTool", "2.1.3").IsIdenticalTo([ToolVersionNode]::new("MyTool2", "2.1.3")) | Should -BeFalse
}
}
Context "ToolVersionsListNode" {
It "ToMarkdown - List" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "List")
$expected = @(
"",
"# MyTool"
"- 2.7.7"
"- 3.0.5"
"- 3.1.3"
) -join "`n"
$node.ToMarkdown() | Should -Be $expected
}
It "ToMarkdown - Inline" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "Inline")
$node.ToMarkdown() | Should -Be "- MyTool: 2.7.7, 3.0.5, 3.1.3"
}
It "GetValue" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "List")
$node.GetValue() | Should -Be "2.7.7, 3.0.5, 3.1.3"
}
It "Serialization - List" {
$node = [ToolVersionsListNode]::new("Ruby", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "List")
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "ToolVersionsListNode"
$json.ToolName | Should -Be "Ruby"
$json.Versions | Should -BeArray @("2.7.7", "3.0.5", "3.1.3")
$json.MajorVersionRegex | Should -Be "^.+"
$json.ListType | Should -Be "List"
}
It "Serialization - Inline" {
$node = [ToolVersionsListNode]::new("Ruby", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "Inline")
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "ToolVersionsListNode"
$json.ToolName | Should -Be "Ruby"
$json.Versions | Should -BeArray @("2.7.7", "3.0.5", "3.1.3")
$json.MajorVersionRegex | Should -Be "^.+"
$json.ListType | Should -Be "Inline"
}
It "Deserialization" {
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = ""; Versions = @("2.1.3", "3.1.4"); MajorVersionRegex = "^\d+"; ListType = "List" }) } | Should -Throw '*Exception setting "ToolName": "The argument is null or empty.*'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; MajorVersionRegex = "^\d+"; ListType = "List" }) } | Should -Throw '*Exception setting "Versions": "The argument is null or empty.*'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @(); MajorVersionRegex = "^\d+"; ListType = "List" }) } | Should -Throw '*Exception setting "Versions": "The argument is null, empty,*'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @("2.1.3", '2.2.4'); MajorVersionRegex = "^\d+"; ListType = "List" }) } | Should -Throw 'Multiple versions from list * return the same result from regex *'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @("2.1.3", "3.1.4"); MajorVersionRegex = ""; ListType = "List" }) } | Should -Throw 'Version * doesn''t match regex *'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @("2.1.3", "3.1.4"); MajorVersionRegex = "^\d+"; ListType = "Fake" }) } | Should -Throw '*Exception setting "ListType": "The argument * does not belong to the set*'
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @("2.1.3", "3.1.4"); MajorVersionRegex = "^\d+"; ListType = "List" }) } | Should -Not -Throw
{ [ToolVersionsListNode]::FromJsonObject(@{ NodeType = "ToolVersionsListNode"; ToolName = "MyTool"; Versions = @("2.1.3", "3.1.4"); MajorVersionRegex = "^\d+"; ListType = "Inline" }) } | Should -Not -Throw
}
It "Serialization + Deserialization" {
$node = [ToolVersionsListNode]::new("Ruby", @("2.7.7", "3.0.5", "3.1.3"), "^.+", "List")
$json = $node.ToJsonObject()
$node2 = [ToolVersionsListNode]::FromJsonObject($json)
$json2 = $node2.ToJsonObject()
$($json | ConvertTo-Json) | Should -Be $($json2 | ConvertTo-Json)
}
It "IsSimilarTo" {
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsSimilarTo(
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List")
) | Should -BeTrue
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsSimilarTo(
[ToolVersionsListNode]::new("MyTool", @("2.1.5", "5.0.0"), "^.+", "List")
) | Should -BeTrue
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsSimilarTo(
[ToolVersionsListNode]::new("MyTool2", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List")
) | Should -BeFalse
}
It "IsIdenticalTo" {
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsIdenticalTo(
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List")
) | Should -BeTrue
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsIdenticalTo(
[ToolVersionsListNode]::new("MyTool", @("2.1.5", "5.0.0"), "^.+", "List")
) | Should -BeFalse
[ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List").IsIdenticalTo(
[ToolVersionsListNode]::new("MyTool2", @("2.1.3", "3.1.5", "4.0.0"), "^.+", "List")
) | Should -BeFalse
}
It "ExtractMajorVersion" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^\d+\.\d+", "List")
$node.ExtractMajorVersion("2.1.3") | Should -Be "2.1"
$node.ExtractMajorVersion("3.1.5") | Should -Be "3.1"
$node.ExtractMajorVersion("4.0.0") | Should -Be "4.0"
}
Context "ValidateMajorVersionRegex" {
It "Major version regex - unique versions" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "4.0.0"), "^\d+", "List")
$node.Versions | Should -BeArray @("2.1.3", "3.1.5", "4.0.0")
}
It "Major version regex - non-unique versions" {
{ [ToolVersionsListNode]::new("MyTool", @("2.1.3", "3.1.5", "3.2.0", "4.0.0"), "^\d+", "List") } | Should -Throw "Multiple versions from list * return the same result from regex *"
}
It "Minor version regex - unique versions" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.1.3", "2.4.0", "3.1.2"), "^\d+\.\d+", "List")
$node.Versions | Should -BeArray @("2.1.3", "2.4.0", "3.1.2")
}
It "Minor version regex - non-unique versions" {
{ [ToolVersionsListNode]::new("MyTool", @("2.1.3", "2.1.4", "3.1.2"), "^\d+\.\d+", "List") } | Should -Throw "Multiple versions from list * return the same result from regex *"
}
It "Patch version regex - unique versions" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.1.3", "2.1.4", "2.1.5"), "^\d+\.\d+\.\d+", "List")
$node.Versions | Should -BeArray @("2.1.3", "2.1.4", "2.1.5")
}
It "Patch version regex - non-unique versions" {
{ [ToolVersionsListNode]::new("MyTool", @("2.1.3", "2.1.4", "2.1.4"), "^\d+\.\d+\.\d+", "List") } | Should -Throw "Multiple versions from list * return the same result from regex *"
}
It ".NET Core version regex - unique versions" {
$node = [ToolVersionsListNode]::new("MyTool", @("2.1.100", "2.1.205", "2.1.303"), "^\d+\.\d+\.\d", "List")
$node.Versions | Should -BeArray @("2.1.100", "2.1.205", "2.1.303")
}
It ".NET Core version regex - non-unique versions" {
{ [ToolVersionsListNode]::new("MyTool", @("2.1.100", "2.1.205", "2.1.230", "3.1.0"), "^\d+\.\d+\.\d", "List") } | Should -Throw "Multiple versions from list * return the same result from regex *"
}
}
}
Context "TableNode" {
It "ToMarkdown (Simple table)" {
$node = [TableNode]::new("Name|Value", @("A|B", "C|D"))
$node.ToMarkdown() | Should -Be @'
| Name | Value |
| ---- | ----- |
| A | B |
| C | D |
'@
}
It "ToMarkdown (Wide cells)" {
$node = [TableNode]::new("Name|Value", @("Very long value here|B", "C|And very long value here too"))
$node.ToMarkdown() | Should -Be @'
| Name | Value |
| -------------------- | ---------------------------- |
| Very long value here | B |
| C | And very long value here too |
'@
}
It "CalculateColumnsWidth" {
[TableNode]::new("Name|Value", @("A|B", "C|D")).CalculateColumnsWidth() | Should -BeArray @(4, 5)
[TableNode]::new("Name|Value", @("Very long value here|B", "C|And very long value here too")).CalculateColumnsWidth() | Should -BeArray @(20, 28)
}
It "Serialization" {
$node = [TableNode]::new("Name|Value", @("A|B", "C|D"))
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "TableNode"
$json.Headers | Should -Be "Name|Value"
$json.Rows | Should -BeArray @("A|B", "C|D")
}
It "Deserialization" {
{ [TableNode]::FromJsonObject(@{ NodeType = "TableNode"; Headers = ""; Rows = @("A|1", "B|2") }) } | Should -Throw 'Exception setting "Headers": "The argument is null or empty. *'
{ [TableNode]::FromJsonObject(@{ NodeType = "TableNode"; Headers = "Name|Value"; Rows = @() }) } | Should -Throw 'Exception setting "Rows": "The argument is null, empty, *'
{ [TableNode]::FromJsonObject(@{ NodeType = "TableNode"; Headers = "Name|Value"; Rows = @("A|1", "B|2|T", "C|3") }) } | Should -Throw 'Table has different number of columns in different rows'
{ [TableNode]::FromJsonObject(@{ NodeType = "TableNode"; Headers = "Name|Value"; Rows = @("A|1", "B|2") }) } | Should -Not -Throw
}
It "Serialization + Deserialization" {
$node = [TableNode]::new("Name|Value", @("A|B", "C|D"))
$json = $node.ToJsonObject()
$node2 = [TableNode]::FromJsonObject($json)
$json2 = $node2.ToJsonObject()
$($json | ConvertTo-Json) | Should -Be $($json2 | ConvertTo-Json)
}
It "IsSimilarTo" {
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsSimilarTo([TableNode]::new("Name|Value", @("A|B", "C|D"))) | Should -BeTrue
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsSimilarTo([TableNode]::new("Name|Value", @("A|B", "C|D", "F|W"))) | Should -BeTrue
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsSimilarTo([TableNode]::new("Name|Value", @("A|B", "C|E"))) | Should -BeTrue
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsSimilarTo([TableNode]::new("Name|Key", @("A|B", "C|D"))) | Should -BeTrue
}
It "IsIdenticalTo" {
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsIdenticalTo([TableNode]::new("Name|Value", @("A|B", "C|D"))) | Should -BeTrue
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsIdenticalTo([TableNode]::new("Name|Key", @("A|B", "C|D"))) | Should -BeTrue
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsIdenticalTo([TableNode]::new("Name|Value", @("A|B", "C|D", "F|W"))) | Should -BeFalse
[TableNode]::new("Name|Value", @("A|B", "C|D")).IsIdenticalTo([TableNode]::new("Name|Value", @("A|B", "C|E"))) | Should -BeFalse
}
Context "FromObjectsArray" {
It "Correct table" {
$table = @(
[PSCustomObject]@{Name = "A"; Value = "B"}
[PSCustomObject]@{Name = "C"; Value = "D"}
)
$tableNode = [TableNode]::FromObjectsArray($table)
$tableNode.Headers | Should -Be "Name|Value"
$tableNode.Rows | Should -BeArray @("A|B", "C|D")
}
It "Correct table with spaces" {
$table = @(
[PSCustomObject]@{Name = "A B"; "My Value" = "1 2"}
[PSCustomObject]@{Name = "C D"; "My Value" = "3 4"}
)
$tableNode = [TableNode]::FromObjectsArray($table)
$tableNode.Headers | Should -Be "Name|My Value"
$tableNode.Rows | Should -BeArray @("A B|1 2", "C D|3 4")
}
It "Throw on empty table" {
{ [TableNode]::FromObjectsArray(@()) } | Should -Throw "Failed to create TableNode from empty objects array"
}
It "Throw on table with different columns" {
$table = @(
[PSCustomObject]@{Name = "A"; Value = "B"}
[PSCustomObject]@{Name = "C"; Value2 = "D"}
)
{ [TableNode]::FromObjectsArray($table) } | Should -Throw "Failed to create TableNode from objects array because objects have different properties"
}
It "Throw on empty row" {
$table = @(
[PSCustomObject]@{Name = "A"; Value = "B"},
[PSCustomObject]@{},
[PSCustomObject]@{Name = "C"; Value2 = "D"}
)
{ [TableNode]::FromObjectsArray($table) } | Should -Throw "Failed to create TableNode because some objects are empty"
}
It "Throw on incorrect symbols in table column names" {
$table = @(
[PSCustomObject]@{"Name|War" = "A"; Value = "B"}
[PSCustomObject]@{"Name|War" = "C"; Value = "D"}
)
{ [TableNode]::FromObjectsArray($table) } | Should -Throw "Failed to create TableNode because some cells * contains forbidden symbol*"
}
It "Throw on incorrect symbols in table rows" {
$table = @(
[PSCustomObject]@{Name = "A"; Value = "B|AA"}
[PSCustomObject]@{Name = "C"; Value = "D"}
)
{ [TableNode]::FromObjectsArray($table) } | Should -Throw "Failed to create TableNode because some cells * contains forbidden symbol*"
}
}
}
Context "NoteNode" {
It "ToMarkdown" {
$node = [NoteNode]::new("Hello world`nGood Bye world")
$node.ToMarkdown() | Should -Be @'
```
hello world
Good Bye world
```
'@
}
It "Serialization" {
$node = [NoteNode]::new("MyContent`nMyContent2")
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "NoteNode"
$json.Content | Should -Be "MyContent`nMyContent2"
}
It "Deserialization" {
{ [NoteNode]::FromJsonObject(@{ NodeType = "NoteNode" }) } | Should -Throw '*Exception setting "Content": "The argument is null or empty.*'
{ [NoteNode]::FromJsonObject(@{ NodeType = "NoteNode"; Content = "" }) } | Should -Throw '*Exception setting "Content": "The argument is null or empty.*'
{ [NoteNode]::FromJsonObject(@{ NodeType = "NoteNode"; Content = "MyTool" }) } | Should -Not -Throw
}
It "Serialization + Deserialization" {
$node = [NoteNode]::new("MyContent`nMyContent2")
$json = $node.ToJsonObject()
$node2 = [NoteNode]::FromJsonObject($json)
$json2 = $node2.ToJsonObject()
$($json | ConvertTo-Json) | Should -Be $($json2 | ConvertTo-Json)
}
It "IsSimilarTo" {
[NoteNode]::new("MyContent").IsSimilarTo([NoteNode]::new("MyContent")) | Should -BeTrue
[NoteNode]::new("MyContent").IsSimilarTo([NoteNode]::new("MyContent2")) | Should -BeFalse
}
It "IsIdenticalTo" {
[NoteNode]::new("MyContent").IsIdenticalTo([NoteNode]::new("MyContent")) | Should -BeTrue
[NoteNode]::new("MyContent").IsIdenticalTo([NoteNode]::new("MyContent2")) | Should -BeFalse
}
}
Context "HeaderNode" {
It "ToMarkdown" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$node.ToMarkdown(1) | Should -Be @'
# MyHeader
- MyTool 2.1.3
'@
}
It "ToMarkdown (level 3)" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$node.ToMarkdown(3) | Should -Be @'
### MyHeader
- MyTool 2.1.3
'@
}
It "ToMarkdown (multiple levels)" {
$node = [HeaderNode]::new("MyHeader")
$node.AddHeader("MyHeader 2").AddHeader("MyHeader 3").AddHeader("MyHeader 4").AddToolVersion("MyTool", "2.1.3")
$node.ToMarkdown(1) | Should -Be @'
# MyHeader
## MyHeader 2
### MyHeader 3
#### MyHeader 4
- MyTool 2.1.3
'@
}
It "Serialization" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$json = $node.ToJsonObject()
$json.NodeType | Should -Be "HeaderNode"
$json.Title | Should -Be "MyHeader"
$json.Children | Should -HaveCount 1
}
It "Deserialization" {
{ [HeaderNode]::FromJsonObject(@{ NodeType = "HeaderNode" }) } | Should -Throw '*Exception setting "Title": "The argument is null or empty.*'
{ [HeaderNode]::FromJsonObject(@{ NodeType = "HeaderNode"; Title = "" }) } | Should -Throw '*Exception setting "Title": "The argument is null or empty.*'
{ [HeaderNode]::FromJsonObject(@{ NodeType = "HeaderNode"; Title = "MyHeader" }) } | Should -Not -Throw
}
It "Serialization + Deserialization" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$json = $node.ToJsonObject()
$node2 = [HeaderNode]::FromJsonObject($json)
$json2 = $node2.ToJsonObject()
$($json | ConvertTo-Json) | Should -Be $($json2 | ConvertTo-Json)
}
It "IsSimilarTo" {
[HeaderNode]::new("MyHeader").IsSimilarTo([HeaderNode]::new("MyHeader")) | Should -BeTrue
[HeaderNode]::new("MyHeader").IsSimilarTo([HeaderNode]::new("MyHeader2")) | Should -BeFalse
}
It "IsIdenticalTo" {
[HeaderNode]::new("MyHeader").IsIdenticalTo([HeaderNode]::new("MyHeader")) | Should -BeTrue
[HeaderNode]::new("MyHeader").IsIdenticalTo([HeaderNode]::new("MyHeader2")) | Should -BeFalse
}
It "FindSimilarChildNode" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$node.FindSimilarChildNode([ToolVersionNode]::new("MyTool", "1.0.0")) | Should -Not -BeNullOrEmpty
$node.FindSimilarChildNode([ToolVersionNode]::New("MyTool2", "1.0.0")) | Should -BeNullOrEmpty
}
Context "Detect node duplicates" {
It "Similar HeaderNode on the same header" {
$node = [HeaderNode]::new("MyHeader")
$node.AddHeader("MySubHeader1")
$node.AddHeader("MySubHeader2")
{ $node.AddHeader("MySubHeader1") } | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "Similar ToolVersionNode on the same header" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersion("MyTool", "2.1.3")
$node.AddToolVersion("MyTool2", "2.1.3")
{ $node.AddToolVersion("MyTool", "2.1.3") } | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "Similar ToolVersionsListNode on the same header" {
$node = [HeaderNode]::new("MyHeader")
$node.AddToolVersionsListInline("MyTool", @("2.1.3", "3.0.0"), "^\d+")
$node.AddToolVersionsListInline("MyTool2", @("2.1.3", "3.0.0"), "^\d+")
{ $node.AddToolVersionsList("MyTool", @("2.1.3", "3.0.0"), "^\d+") } | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "Similar TableNode on the same header" {
$node = [HeaderNode]::new("MyHeader")
$node.AddTable(@(
[PSCustomObject]@{Name = "Value1"},
[PSCustomObject]@{Name = "Value2"}
))
{
$node.AddTable(@(
[PSCustomObject]@{Name = "Value1"},
[PSCustomObject]@{Name = "Value2"}
))
} | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "Similar NoteNode on the same header" {
$node = [HeaderNode]::new("MyHeader")
$node.AddNote("MyContent")
$node.AddNote("MyContent2")
{ $node.AddNote("MyContent") } | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "AddNode detects duplicates" {
$node = [HeaderNode]::new("MyHeader")
$node.AddNode([ToolVersionNode]::new("MyTool", "2.1.3"))
{ $node.AddNode([ToolVersionNode]::new("MyTool", "2.1.3")) } | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "AddNodes detects duplicates" {
$node = [HeaderNode]::new("MyHeader")
$node.AddNodes(@(
[ToolVersionNode]::new("MyTool", "2.1.3"),
[ToolVersionNode]::new("MyTool2", "2.1.4")
))
{
$node.AddNodes(@(
[ToolVersionNode]::new("MyTool3", "2.1.5"),
[ToolVersionNode]::new("MyTool", "2.1.3")
))
} | Should -Throw "This HeaderNode already contains the similar child node. It is not allowed to add the same node twice.*"
}
It "Doesn't allow adding non-header nodes after header node" {
$node = [HeaderNode]::new("MyHeader")
{ $node.AddToolVersion("MyTool", "2.1.3") } | Should -Not -Throw
{ $node.AddHeader("MySubHeader") } | Should -Not -Throw
{ $node.AddToolVersion("MyTool2", "2.1.4") } | Should -Throw "It is not allowed to add the non-header node after the header node. Consider adding the separate HeaderNode for this node"
{ $node.AddHeader("MySubHeader2") } | Should -Not -Throw
{ $node.AddToolVersionsListInline("MyTool3", @("2.1.4", "2.1.5"), "^.+") } | Should -Throw "It is not allowed to add the non-header node after the header node. Consider adding the separate HeaderNode for this node"
{ $node.AddToolVersionsList("MyTool4", @("2.1.4", "2.1.5"), "^.+") } | Should -Not -Throw
}
}
}
}
@@ -1,34 +0,0 @@
function ShouldBeArray([Array] $ActualValue, [Array]$ExpectedValue, [Switch] $Negate, [String] $Because) {
if ($Negate) {
throw "Negation is not supported for Should-BeArray"
}
if ($ExpectedValue.Count -eq 0) {
throw "Expected array cannot be empty. Use Should-BeNullOrEmpty instead."
}
$ExpectedValue | ForEach-Object {
if ($_.GetType() -notin @([String], [Int32])) {
throw "Only string or int arrays are supported in Should-BeArray"
}
}
$actualValueJson = $ActualValue | ConvertTo-Json
$expectedValueJson = $ExpectedValue | ConvertTo-Json
$succeeded = ($ActualValue.Count -eq $ExpectedValue.Count) -and ($actualValueJson -eq $expectedValueJson)
if (-not $succeeded) {
$failureMessage = "Expected array '$actualValueJson' to be equal to '$expectedValueJson'"
}
return [PSCustomObject]@{
Succeeded = $succeeded
FailureMessage = $failureMessage
}
}
Add-ShouldOperator -Name BeArray `
-InternalName 'ShouldBeArray' `
-Test ${function:ShouldBeArray} `
-SupportsArrayInput
@@ -4,46 +4,16 @@
# - https://github.community/t5/GitHub-Actions/GitHub-Actions-Manual-Trigger-Approvals/td-p/31504
# - https://github.community/t5/GitHub-Actions/Protecting-github-workflows/td-p/30290
parameters:
- name: job_id
type: string
default: 'generate_image'
- name: image_type
type: string
- name: image_readme_name
type: string
- name: agent_pool
type: object
default:
name: 'ci-agent-pool'
- name: variable_group_name
type: string
default: 'Image Generation Variables'
- name: create_release
type: boolean
default: true
- name: repository_ref
type: string
default: 'self'
jobs:
- job: ${{ parameters.job_id }}
- job:
displayName: Image Generation (${{ parameters.image_type }})
timeoutInMinutes: 600
cancelTimeoutInMinutes: 30
pool: ${{ parameters.agent_pool }}
pool: ci-agent-pool
variables:
- group: ${{ parameters.variable_group_name }}
- group: Image Generation Variables
steps:
- checkout: ${{ parameters.repository_ref }}
- task: PowerShell@2
displayName: 'Download custom repository'
condition: and(ne(variables['CUSTOM_REPOSITORY_URL'], ''), ne(variables['CUSTOM_REPOSITORY_BRANCH'], ''))
@@ -89,41 +59,13 @@ jobs:
env:
PACKER_LOG: 1
PACKER_LOG_PATH: $(Build.ArtifactStagingDirectory)/packer-log.txt
- task: PowerShell@2
displayName: 'Copy image artifacts to the separate directory'
displayName: 'Output Readme file content'
inputs:
targetType: 'inline'
script: |
$readmePath = Join-Path "$(TemplateDirectoryPath)" "${{ parameters.image_readme_name }}"
$softwareReportPath = Join-Path "$(TemplateDirectoryPath)" "software-report.json"
Copy-Item -Path $readmePath -Destination "$(Build.ArtifactStagingDirectory)/"
if (Test-Path $softwareReportPath) {
Copy-Item -Path $softwareReportPath -Destination "$(Build.ArtifactStagingDirectory)/"
}
- task: PowerShell@2
displayName: 'Print markdown software report'
inputs:
targetType: 'inline'
script: |
Get-Content -Path "$(Build.ArtifactStagingDirectory)/${{ parameters.image_readme_name }}"
- task: PowerShell@2
displayName: 'Print json software report'
inputs:
targetType: 'inline'
script: |
$softwareReportPath = "$(Build.ArtifactStagingDirectory)/software-report.json"
if (Test-Path $softwareReportPath) {
Get-Content -Path $softwareReportPath
}
- task: PublishBuildArtifacts@1
inputs:
ArtifactName: 'Built_VM_Artifacts'
displayName: Publish Artifacts
Get-Content -Path (Join-Path "$(TemplateDirectoryPath)" "${{ parameters.image_readme_name }}")
- task: PowerShell@2
displayName: 'Print provisioners duration'
@@ -134,18 +76,17 @@ jobs:
-PrefixToPathTrim "$(TemplateDirectoryPath)" `
-PrintTopNLongest 25
- ${{ if eq(parameters.create_release, true) }}:
- task: PowerShell@2
displayName: 'Create release for VM deployment'
inputs:
targetType: filePath
filePath: ./images.CI/linux-and-win/create-release.ps1
arguments: -BuildId $(Build.BuildId) `
-Organization $(RELEASE_TARGET_ORGANIZATION) `
-DefinitionId $(RELEASE_TARGET_DEFINITION_ID) `
-Project $(RELEASE_TARGET_PROJECT) `
-ImageName ${{ parameters.image_type }} `
-AccessToken $(RELEASE_TARGET_TOKEN)
- task: PowerShell@2
displayName: 'Create release for VM deployment'
inputs:
targetType: filePath
filePath: ./images.CI/linux-and-win/create-release.ps1
arguments: -BuildId $(Build.BuildId) `
-Organization $(RELEASE_TARGET_ORGANIZATION) `
-DefinitionId $(RELEASE_TARGET_DEFINITION_ID) `
-Project $(RELEASE_TARGET_PROJECT) `
-ImageName ${{ parameters.image_type }} `
-AccessToken $(RELEASE_TARGET_TOKEN)
- task: PowerShell@2
displayName: 'Clean up resources'
+1 -1
View File
@@ -16,7 +16,7 @@ function Push-AnkaTemplateToRegistry {
# if registry uuid doesn't match than delete an image in registry
$images = anka --machine-readable registry --registry-path $RegistryUrl list | ConvertFrom-Json | ForEach-Object body
$images | Where-Object name -eq $TemplateName | ForEach-Object {
$id = $_.uuid
$id = $_.id
Show-StringWithFormat "Deleting '$TemplateName[$id]' VM and '$TagName' tag"
$uri = '{0}/registry/vm?id={1}' -f $RegistryUrl, $id
Invoke-WebRequest -Uri $uri -Method Delete | Out-Null
@@ -107,11 +107,7 @@ jobs:
- bash: |
cat "$(Build.ArtifactStagingDirectory)/systeminfo.md"
displayName: Print markdown software report
- bash: |
cat "$(Build.ArtifactStagingDirectory)/systeminfo.json"
displayName: Print json software report
displayName: Print software report
- task: PublishBuildArtifacts@1
inputs:
@@ -0,0 +1,23 @@
name: macOS-10.15_$(date:yyyyMMdd)$(rev:.r)_unstable
schedules:
- cron: "0 0 * * *"
displayName: Daily
branches:
include:
- main
always: true
trigger: none
pr:
autoCancel: true
branches:
include:
- main
jobs:
- template: image-generation.yml
parameters:
image_label: 'macOS Catalina'
base_image_name: 'clean-macOS-10.15-380Gb-runner'
template_path: 'templates/macOS-10.15.json'
target_datastore: 'ds-image'
+206 -200
View File
@@ -1,57 +1,49 @@
| Announcements |
|-|
| [[all OSs] Default Nodejs version will be set to 18 on February, 13](https://github.com/actions/runner-images/issues/7002) |
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 2022/08/08 and will be fully unsupported by 2023/04/01](https://github.com/actions/runner-images/issues/6002) |
| [[Ubuntu] homebrew will be removed from $PATH](https://github.com/actions/runner-images/issues/6283) |
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 8/8/22 and will be fully unsupported by 4/1/2023](https://github.com/actions/runner-images/issues/6002) |
***
# Ubuntu 18.04
- OS Version: 18.04.6 LTS
- Kernel Version: 5.4.0-1103-azure
- Image Version: 20230217.2
# Ubuntu 18.04.6 LTS
- Linux kernel version: 5.4.0-1091-azure
- Image Version: 20220923.1
## Installed Software
### Language and Runtime
- Bash 4.4.20(1)-release
- Clang: 9.0.0
- Clang-format: 9.0.0
- Clang-tidy: 9.0.0
- Clang 9.0.0
- Clang-format 9.0.0
- Clang-tidy 9.0.0
- Dash 0.5.8-2.10
- Erlang 25.0.4 (Eshell 13.0.4)
- Erlang rebar3 3.20.0
- GNU C++: 7.5.0, 9.4.0, 10.3.0
- GNU Fortran: 7.5.0, 9.4.0, 10.3.0
- Julia 1.8.5
- Kotlin 1.8.10-release-430
- Mono 6.12.0.182
- MSBuild 16.10.1.31701 (Mono 6.12.0.182)
- Node.js 16.19.1
- Erlang rebar3 3.19.0
- GNU C++ 7.5.0, 9.4.0, 10.3.0
- GNU Fortran 7.5.0, 9.4.0, 10.3.0
- Julia 1.8.1
- Kotlin 1.7.10-release-333
- Mono 6.12.0.182 (apt source repository: https://download.mono-project.com/repo/ubuntu stable-bionic main)
- MSBuild 16.10.1.31701 (from /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node 16.17.0
- Perl 5.26.1
- Python 2.7.17
- Python3 3.6.9
- Ruby 2.5.1p57
- Swift 5.7.3
- Swift 5.7
### Package Management
- cpan 1.64
- Helm 3.11.1
- Homebrew 4.0.1
- Miniconda 23.1.0
- Npm 8.19.3
- NuGet 6.3.1.1
- Helm 3.10.0
- Homebrew 3.6.2
- Miniconda 4.12.0
- Npm 8.15.0
- NuGet 6.2.1.2
- Pip 9.0.1
- Pip3 9.0.1
- Pipx 1.0.0
- RubyGems 2.7.6
- Vcpkg (build from commit 31a159c1c)
- Vcpkg (build from master \<86eb754bc>)
- Yarn 1.22.19
#### Environment variables
| Name | Value |
| ----------------------- | ---------------------- |
| CONDA | /usr/share/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
#### Homebrew note
##### Notes:
```
Location: /home/linuxbrew
Note: Homebrew is pre-installed on image but not added to PATH.
@@ -59,120 +51,128 @@ run the eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" command
to accomplish this.
```
#### Environment variables
| Name | Value |
| ----------------------- | ---------------------- |
| CONDA | /usr/share/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
| VCPKG_ROOT | /usr/local/share/vcpkg |
### Project Management
- Ant 1.10.5
- Gradle 8.0.1
- Maven 3.8.7
- Sbt 1.8.2
- Gradle 7.5.1
- Maven 3.8.6
- Sbt 1.7.1
### Tools
- Ansible 2.11.12
- apt-fast 1.9.12
- AzCopy 10.17.0 - available by `azcopy` and `azcopy10` aliases
- Bazel 6.0.0
- AzCopy 10.16.0 (available by `azcopy` and `azcopy10` aliases)
- Bazel 5.3.1
- Bazelisk 1.13.2
- Bicep 0.14.46
- Buildah 1.22.3
- CMake 3.25.2
- CodeQL Action Bundles 2.12.1 2.12.2
- Bicep 0.10.61
- Buildah 1.22.3 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- CMake 3.24.2
- CodeQL Action Bundle 2.10.5
- Docker Amazon ECR Credential Helper 0.6.0
- Docker Compose v1 1.29.2
- Docker Compose v2 2.16.0+azure-2
- Docker-Buildx 0.10.3
- Docker-Moby Client 20.10.23+azure-2
- Docker-Moby Server 20.10.22+azure-1
- Git 2.39.2
- Git LFS 3.2.0
- Docker Compose v2 2.11.0+azure-1
- Docker-Buildx 0.9.1
- Docker-Moby Client 20.10.18+azure-1
- Docker-Moby Server 20.10.18+azure-1
- Git 2.37.3 (apt source repository: ppa:git-core/ppa)
- Git LFS 3.2.0 (apt source repository: https://packagecloud.io/install/repositories/github/git-lfs)
- Git-ftp 1.3.1
- Haveged 1.9.1
- Heroku 7.68.1
- Heroku 7.63.4
- HHVM (HipHop VM) 4.164.0
- jq 1.5
- Kind 0.17.0
- Kubectl 1.26.1
- Kustomize 5.0.0
- Leiningen 2.10.0
- Kind 0.16.0
- Kubectl 1.25.2
- Kustomize 4.5.7
- Leiningen 2.9.10
- MediaInfo 17.12
- Mercurial 4.5.3
- Minikube 1.29.0
- n 9.0.1
- Minikube 1.27.0
- n 9.0.0
- Newman 5.3.2
- nvm 0.39.3
- OpenSSL 1.1.1-1ubuntu2.1~18.04.21
- Packer 1.8.6
- Parcel 2.8.3
- nvm 0.39.1
- OpenSSL 1.1.1-1ubuntu2.1~18.04.20
- Packer 1.8.3
- Parcel 2.7.0
- PhantomJS 2.1.1
- Podman 3.4.2
- Pulumi 3.55.0
- R 4.2.2
- Skopeo 1.5.0
- Podman 3.4.2 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- Pulumi 3.40.1
- R 4.2.1
- Skopeo 1.5.0 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- Sphinx Open Source Search Server 2.2.11
- SVN 1.9.7
- Terraform 1.3.9
- Terraform 1.3.0
- yamllint 1.28.0
- yq 4.30.8
- zstd 1.5.4
- yq 4.27.5
- zstd 1.5.2 (homebrew)
### CLI Tools
- Alibaba Cloud CLI 3.0.149
- AWS CLI 2.10.1
- AWS CLI Session Manager Plugin 1.2.398.0
- AWS SAM CLI 1.73.0
- Azure CLI 2.45.0
- Azure CLI (azure-devops) 0.26.0
- GitHub CLI 2.23.0
- Google Cloud SDK 418.0.0
- Alibaba Cloud CLI 3.0.127
- AWS CLI 2.7.34
- AWS CLI Session manager plugin 1.2.339.0
- AWS SAM CLI 1.57.0
- Azure CLI (azure-cli) 2.40.0 (installation method: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt)
- Azure CLI (azure-devops) 0.25.0
- GitHub CLI 2.16.0
- Google Cloud SDK 403.0.0 (apt source repository: https://packages.cloud.google.com/apt)
- Hub CLI 2.14.2
- Netlify CLI 12.13.1
- OpenShift CLI 4.12.3
- ORAS CLI 0.16.0
- Vercel CLI 28.16.2
- Netlify CLI 11.8.2
- OpenShift CLI 4.11.5
- ORAS CLI 0.14.1
- Vercel CLI 28.4.2
### Java
| Version | Vendor | Environment Variable |
| ------------------- | --------------- | -------------------- |
| 8.0.362+9 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.18+10 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 8.0.345+1 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.16+1 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 12.0.2+10 | Adopt OpenJDK | JAVA_HOME_12_X64 |
| 17.0.6+10 | Eclipse Temurin | JAVA_HOME_17_X64 |
| 17.0.4+1 | Eclipse Temurin | JAVA_HOME_17_X64 |
### PHP Tools
- PHP: 7.2.34, 7.3.33, 7.4.33, 8.0.28, 8.1.16, 8.2.3
- Composer 2.5.4
- PHPUnit 8.5.32
### PHP
| Tool | Version |
| -------- | ---------------------------------- |
| PHP | 7.2.34 7.3.33 7.4.30 8.0.23 8.1.10 |
| Composer | 2.4.2 |
| PHPUnit | 8.5.29 |
```
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
```
### Haskell Tools
### Haskell
- Cabal 3.6.2.0
- GHC 9.4.4
- GHCup 0.1.19.0
- Stack 2.9.3
- GHC 9.4.2
- GHCup 0.1.18.0
- Stack 2.9.1
### Rust Tools
- Cargo 1.67.1
- Rust 1.67.1
- Rustdoc 1.67.1
- Rustup 1.25.2
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.64.0
- Cargo audit 0.17.4
- Cargo clippy 0.1.67
- Cargo outdated 0.11.2
- Bindgen 0.60.1
- Cargo audit 0.17.0
- Cargo clippy 0.1.64
- Cargo outdated 0.11.1
- Cbindgen 0.24.3
- Rustfmt 1.5.1
### Browsers and Drivers
- Google Chrome 110.0.5481.100
- ChromeDriver 110.0.5481.77
- Chromium 110.0.5481.0
- Microsoft Edge 110.0.1587.50
- Microsoft Edge WebDriver 110.0.1587.50
- Selenium server 4.8.0
- Mozilla Firefox 110.0
- Geckodriver 0.32.2
- Google Chrome 105.0.5195.125
- ChromeDriver 105.0.5195.52
- Chromium 105.0.5177.0
- Microsoft Edge 105.0.1343.50 (apt source repository: https://packages.microsoft.com/repos/edge)
- Microsoft Edge WebDriver 105.0.1343.42
- Selenium server 4.4.0
- Mozilla Firefox 104.0
- Geckodriver 0.31.0
#### Environment variables
| Name | Value |
@@ -182,78 +182,85 @@ Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
| GECKOWEBDRIVER | /usr/local/share/gecko_driver |
| SELENIUM_JAR_PATH | /usr/share/java/selenium-server.jar |
### .NET Tools
- .NET Core SDK: 3.1.120, 3.1.202, 3.1.302, 3.1.426, 6.0.406
- nbgv 3.5.119+5d25f54fec
### .NET Core SDK
- 3.1.120 3.1.202 3.1.302 3.1.423 5.0.104 5.0.214 5.0.303 5.0.408 6.0.401
### .NET tools
- nbgv 3.5.113+a908c6d9d2
### Databases
- MongoDB 5.0.14
- MongoDB 5.0.12 (apt source repository: https://repo.mongodb.org/apt/ubuntu)
- sqlite3 3.22.0
#### PostgreSQL
- PostgreSQL 14.7
```
User: postgres
PostgreSQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
- PostgreSQL 14.5 (apt source repository: https://apt.postgresql.org/pub/repos/apt/)
- PostgreSQL Server (user:postgres)
```
PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
#### MySQL
- MySQL 5.7.41
```
User: root
Password: root
MySQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
- MySQL 5.7.39
- MySQL Server (user:root password:root)
#### MS SQL
```
MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
#### MS SQL Server Client Tools
- sqlcmd 17.10.0001.1
- SqlPackage 16.1.8089.0
- SqlPackage 16.0.6296.0
### Cached Tools
#### Go
- 1.16.15
- 1.17.13
- 1.18.10
- 1.18.6
#### Node.js
- 14.21.3
- 16.19.1
- 18.14.1
- 12.22.12
- 14.20.0
- 16.17.0
#### PyPy
- 2.7.18 [PyPy 7.3.9]
- 3.6.12 [PyPy 7.3.3]
- 3.9.12 [PyPy 7.3.9]
#### Python
- 2.7.18
- 3.6.15
- 3.7.15
- 3.8.16
- 3.9.16
- 3.10.10
- 3.11.2
#### PyPy
- 2.7.18 [PyPy 7.3.11]
- 3.6.12 [PyPy 7.3.3]
- 3.9.16 [PyPy 7.3.11]
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.7
#### Ruby
- 2.4.10
- 2.5.9
- 2.6.10
- 2.7.7
- 3.0.5
- 3.1.3
- 2.7.6
- 3.0.4
- 3.1.2
#### Environment variables
| Name | Value | Architecture |
| --------------- | ----------------------------------- | ------------ |
| GOROOT_1_16_X64 | /opt/hostedtoolcache/go/1.16.15/x64 | x64 |
| GOROOT_1_17_X64 | /opt/hostedtoolcache/go/1.17.13/x64 | x64 |
| GOROOT_1_18_X64 | /opt/hostedtoolcache/go/1.18.6/x64 | x64 |
### PowerShell Tools
- PowerShell 7.2.9
- PowerShell 7.2.6
#### PowerShell Modules
- Az: 9.3.0
- Az (Cached): 3.1.0.zip, 4.4.0.zip, 5.9.0.zip, 6.6.0.zip, 7.5.0.zip
- MarkdownPS: 1.9
- Microsoft.Graph: 1.22.0
- Pester: 5.4.0
| Module | Version |
| --------------- | ------- |
| MarkdownPS | 1.9 |
| Microsoft.Graph | 1.12.1 |
| Pester | 5.3.3 |
#### Az PowerShell Modules
- 7.5.0 3.1.0.zip 4.4.0.zip 5.9.0.zip 6.6.0.zip
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
@@ -262,54 +269,54 @@ Use the following command as a part of your job to start the service: 'sudo syst
| nginx | 1.14.0 | /etc/nginx/nginx.conf | inactive | 80 |
### Android
| Package Name | Version |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 8.0 |
| Android Emulator | 32.1.11 |
| Android SDK Build-tools | 33.0.0 33.0.1 33.0.2<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3<br>26.0.0 26.0.1 26.0.2 26.0.3<br>25.0.0 25.0.1 25.0.2 25.0.3<br>24.0.0 24.0.1 24.0.2 24.0.3<br>23.0.1 23.0.2 23.0.3 |
| Android SDK Platform-Tools | 34.0.0 |
| Android SDK Platforms | android-33-ext4 (rev 1)<br>android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3)<br>android-26 (rev 2)<br>android-25 (rev 3)<br>android-24 (rev 2)<br>android-23 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google APIs | addon-google_apis-google-21<br>addon-google_apis-google-22<br>addon-google_apis-google-23<br>addon-google_apis-google-24 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default) |
| SDK Patch Applier v4 | 1 |
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.11 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3<br>26.0.0 26.0.1 26.0.2 26.0.3<br>25.0.0 25.0.1 25.0.2 25.0.3<br>24.0.0 24.0.1 24.0.2 24.0.3<br>23.0.1 23.0.2 23.0.3 |
| Android SDK Platform-Tools | 33.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3)<br>android-26 (rev 2)<br>android-25 (rev 3)<br>android-24 (rev 2)<br>android-23 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google APIs | addon-google_apis-google-21<br>addon-google_apis-google-22<br>addon-google_apis-google-23<br>addon-google_apis-google-24 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.1.8937393 (default) |
| SDK Patch Applier v4 | 1 |
#### Environment variables
| Name | Value |
| ----------------------- | ------------------------------------------- |
| ANDROID_HOME | /usr/local/lib/android/sdk |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_SDK_ROOT | /usr/local/lib/android/sdk |
### Cached Docker images
| Repository:Tag | Digest | Created |
| ----------------------- | ------------------------------------------------------------------------ | ---------- |
| alpine:3.12 | sha256:c75ac27b49326926b803b9ed43bf088bc220d22556de1bc5f72d742c91398f69 | 2022-04-05 |
| alpine:3.13 | sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 | 2022-08-09 |
| alpine:3.14 | sha256:560e7a4fa5c891d1830f5591c80b8e472fa6cd386b7254cdf65ccc3249292a34 | 2023-02-11 |
| buildpack-deps:bullseye | sha256:40b14eb195795a586ac132c9b506253bc3e4ee7f48a63b685e5bf37e80b774cf | 2023-02-09 |
| buildpack-deps:buster | sha256:a3e4aaa53bf83302adfb9d8b9ba3996948e4605baac297921d3a173c14603748 | 2023-02-09 |
| alpine:3.13 | sha256:100448e45467d4f3838fc8d95faab2965e22711b6edf67bbd8ec9c07f612b553 | 2022-08-09 |
| alpine:3.14 | sha256:1ab24b3b99320975cca71716a7475a65d263d0b6b604d9d14ce08f7a3f67595c | 2022-08-09 |
| buildpack-deps:bullseye | sha256:19683807e2587d777766573697f9488b0c88677ee06313e69197fbaa42e80319 | 2022-09-13 |
| buildpack-deps:buster | sha256:caa4ae706b59e2ca4b7786a44a08617447f81b516507a70a4ca43665b479c4e3 | 2022-09-13 |
| buildpack-deps:stretch | sha256:78e995165a5788c2f55aed6e548d8f6c1534830d4310c870408fccb2da8c5b2e | 2022-06-23 |
| debian:10 | sha256:233c3bbc892229c82da7231980d50adceba4db56a08c0b7053a4852782703459 | 2023-02-09 |
| debian:11 | sha256:43ef0c6c3585d5b406caa7a0f232ff5a19c1402aeb415f68bcd1cf9d10180af8 | 2023-02-09 |
| debian:10 | sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb | 2022-09-13 |
| debian:11 | sha256:3e82b1af33607aebaeb3641b75d6e80fd28d36e17993ef13708e9493e30e8ff9 | 2022-09-13 |
| debian:9 | sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be | 2022-06-23 |
| moby/buildkit:latest | sha256:751921dc37d2f842de38c9387f891fe6ae7d80f03d050ea98f780d7e0874ba00 | 2023-02-13 |
| node:14 | sha256:a58436325059a278c35079034ce5c98dace7204a2a5748929ccc79087f959daa | 2023-02-17 |
| node:14-alpine | sha256:1a1a30ee1faa7d512917e277cc8c81744e79096de3561ecda7ea17cc2ceab372 | 2023-02-17 |
| node:16 | sha256:102e907ac88ac60cbad62b09ce003fa11618687621c45da2a2514703be1d1b1a | 2023-02-17 |
| node:16-alpine | sha256:77f92924c9734d4acdeb5ec42de85867b10c0031f2e861d26cdae6abd56cf858 | 2023-02-17 |
| node:18 | sha256:888e7f9ead4aa3257e9c91528b9f63a427d8a926876ef5ae27ecba2651ae211d | 2023-02-17 |
| node:18-alpine | sha256:178bf3eb09c4245fda8c81c1063c0d55c45d7a7f4ddc5296814107b1dc610450 | 2023-02-17 |
| ubuntu:16.04 | sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 | 2021-08-31 |
| ubuntu:18.04 | sha256:a3765b4d74747b5e9bdd03205b3fbc4fa19a02781c185f97f24c8f4f84ed7bbf | 2023-01-26 |
| ubuntu:20.04 | sha256:4a45212e9518f35983a976eead0de5eecc555a2f047134e9dd2cfc589076a00d | 2023-02-01 |
| moby/buildkit:latest | sha256:67c9251f9f2e103e1ee489b6cead518b6d82607ef485d3f1505fc4095a55ebeb | 2022-08-22 |
| node:12 | sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e | 2022-04-20 |
| node:12-alpine | sha256:d4b15b3d48f42059a15bd659be60afe21762aae9d6cbea6f124440895c27db68 | 2022-04-11 |
| node:14 | sha256:6adfb0c2a9db12a06893974bb140493a7482e2b3df59c058590594ceecd0c99b | 2022-09-13 |
| node:14-alpine | sha256:4aff4ba0da347e51561587eba037a38db4eaa70e1a6c8334d66779fe963d5be7 | 2022-08-09 |
| node:16 | sha256:a5d9200d3b8c17f0f3d7717034a9c215015b7aae70cb2a9d5e5dae7ff8aa6ca8 | 2022-09-13 |
| node:16-alpine | sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b | 2022-08-16 |
| ubuntu:16.04 | sha256:91bd29a464fdabfcf44e29e1f2a5f213c6dfa750b6290e40dd6998ac79da3c41 | 2021-08-31 |
| ubuntu:18.04 | sha256:6fec50623d6d37b7f3c14c5b6fc36c73fd04aa8173d59d54dba00da0e7ac50ee | 2022-09-06 |
| ubuntu:20.04 | sha256:35ab2bf57814e9ff49e365efd5a5935b6915eede5c7f8581e9e1b85e0eecbe16 | 2022-09-01 |
### Installed apt packages
| Name | Version |
@@ -317,14 +324,14 @@ Use the following command as a part of your job to start the service: 'sudo syst
| aria2 | 1.33.1-1 |
| autoconf | 2.69-11 |
| automake | 1:1.15.1-3ubuntu2 |
| binutils | 2.30-21ubuntu1\~18.04.8 |
| binutils | 2.30-21ubuntu1\~18.04.7 |
| bison | 2:3.0.4.dfsg-1build1 |
| brotli | 1.0.3-1ubuntu1.3 |
| build-essential | 12.4ubuntu1 |
| bzip2 | 1.0.6-8.1ubuntu0.2 |
| coreutils | 8.28-1ubuntu1 |
| curl | 7.58.0-2ubuntu3.22 |
| dbus | 1.12.2-1ubuntu1.4 |
| curl | 7.58.0-2ubuntu3.20 |
| dbus | 1.12.2-1ubuntu1.3 |
| dnsutils | 1:9.11.3+dfsg-1ubuntu1.18 |
| dpkg | 1.19.0.5ubuntu2.4 |
| fakeroot | 1.22-2ubuntu1 |
@@ -333,28 +340,27 @@ Use the following command as a part of your job to start the service: 'sudo syst
| ftp | 0.17-34 |
| gnupg2 | 2.2.4-1ubuntu1.6 |
| haveged | 1.9.1-6 |
| imagemagick | 8:6.9.7.4+dfsg-16ubuntu6.15 |
| imagemagick | 8:6.9.7.4+dfsg-16ubuntu6.13 |
| iproute2 | 4.15.0-2ubuntu1.3 |
| iputils-ping | 3:20161105-1ubuntu3 |
| jq | 1.5+dfsg-2 |
| lib32z1 | 1:1.2.11.dfsg-0ubuntu2.2 |
| libc++-dev | 6.0-2 |
| libc++abi-dev | 6.0-2 |
| libcurl3 | 7.58.0-2ubuntu3.22 |
| libcurl3 | 7.58.0-2ubuntu3.20 |
| libgbm-dev | 20.0.8-0ubuntu1\~18.04.1 |
| libgconf-2-4 | 3.2.6-4ubuntu1 |
| libgsl-dev | 2.4+dfsg-6 |
| libgtk-3-0 | 3.22.30-1ubuntu4 |
| libmagic-dev | 1:5.32-2ubuntu0.4 |
| libmagickcore-dev | 8:6.9.7.4+dfsg-16ubuntu6.15 |
| libmagickwand-dev | 8:6.9.7.4+dfsg-16ubuntu6.15 |
| libmagickcore-dev | 8:6.9.7.4+dfsg-16ubuntu6.13 |
| libmagickwand-dev | 8:6.9.7.4+dfsg-16ubuntu6.13 |
| libsecret-1-dev | 0.18.6-1 |
| libsqlite3-dev | 3.22.0-1ubuntu0.7 |
| libsqlite3-dev | 3.22.0-1ubuntu0.6 |
| libtool | 2.4.6-2 |
| libunwind8 | 1.2.1-8 |
| libxkbfile-dev | 1:1.0.9-2 |
| libxss1 | 1:1.2.2-1 |
| libyaml-dev | 0.1.7-2ubuntu3 |
| locales | 2.27-3ubuntu1.6 |
| m4 | 1.4.18-1 |
| mediainfo | 17.12-1 |
@@ -369,29 +375,29 @@ Use the following command as a part of your job to start the service: 'sudo syst
| patchelf | 0.9-1 |
| pkg-config | 0.29.1-0ubuntu2 |
| pollinate | 4.33-0ubuntu1\~18.04.2 |
| python-setuptools | 39.0.1-2ubuntu0.1 |
| python-setuptools | 39.0.1-2 |
| rpm | 4.14.1+dfsg1-2 |
| rsync | 3.1.2-2.1ubuntu1.5 |
| shellcheck | 0.4.6-1 |
| sphinxsearch | 2.2.11-2 |
| sqlite3 | 3.22.0-1ubuntu0.7 |
| sqlite3 | 3.22.0-1ubuntu0.6 |
| ssh | 1:7.6p1-4ubuntu0.7 |
| sshpass | 1.06-1 |
| subversion | 1.9.7-4ubuntu1.1 |
| sudo | 1.8.21p2-3ubuntu1.5 |
| sudo | 1.8.21p2-3ubuntu1.4 |
| swig | 3.0.12-1 |
| tar | 1.29b-2ubuntu0.3 |
| telnet | 0.17-41 |
| texinfo | 6.5.0.dfsg.1-2 |
| time | 1.7-25.1build1 |
| tk | 8.6.0+9 |
| tzdata | 2022g-0ubuntu0.18.04 |
| unzip | 6.0-21ubuntu1.2 |
| tzdata | 2022c-0ubuntu0.18.04.0 |
| unzip | 6.0-21ubuntu1.1 |
| upx | 3.94-4 |
| wget | 1.19.4-1ubuntu2.2 |
| xorriso | 1.4.8-3 |
| xvfb | 2:1.19.6-1ubuntu4.14 |
| xvfb | 2:1.19.6-1ubuntu4.11 |
| xz-utils | 5.2.2-1.3ubuntu0.1 |
| zip | 3.0-11build1 |
| zsync | 0.6.2-3ubuntu1 |
+217 -210
View File
@@ -1,183 +1,184 @@
| Announcements |
|-|
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 2022/08/08 and will be fully unsupported by 2023/04/01](https://github.com/actions/runner-images/issues/6002) |
| [[Ubuntu] homebrew will be removed from $PATH](https://github.com/actions/runner-images/issues/6283) |
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 8/8/22 and will be fully unsupported by 4/1/2023](https://github.com/actions/runner-images/issues/6002) |
***
# Ubuntu 20.04
- OS Version: 20.04.5 LTS
- Kernel Version: 5.15.0-1033-azure
- Image Version: 20230219.1
# Ubuntu 20.04.5 LTS
- Linux kernel version: 5.15.0-1020-azure
- Image Version: 20220922.2
## Installed Software
### Language and Runtime
- Bash 5.0.17(1)-release
- Clang: 10.0.0, 11.0.0, 12.0.0
- Clang-format: 10.0.0, 11.0.0, 12.0.0
- Clang-tidy: 10.0.0, 11.0.0, 12.0.0
- Clang 10.0.0, 11.0.0, 12.0.0
- Clang-format 10.0.0, 11.0.0, 12.0.0
- Clang-tidy 10.0.0, 11.0.0, 12.0.0
- Dash 0.5.10.2-6
- Erlang 25.0.4 (Eshell 13.0.4)
- Erlang rebar3 3.20.0
- GNU C++: 9.4.0, 10.3.0
- GNU Fortran: 9.4.0, 10.3.0
- Julia 1.8.5
- Kotlin 1.8.10-release-430
- Mono 6.12.0.182
- MSBuild 16.10.1.31701 (Mono 6.12.0.182)
- Node.js 18.14.1
- Erlang rebar3 3.19.0
- GNU C++ 9.4.0, 10.3.0
- GNU Fortran 9.4.0, 10.3.0
- Julia 1.8.1
- Kotlin 1.7.10-release-333
- Mono 6.12.0.182 (apt source repository: https://download.mono-project.com/repo/ubuntu stable-focal main)
- MSBuild 16.10.1.31701 (from /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node 16.17.0
- Perl 5.30.0
- Python 3.8.10
- Python3 3.8.10
- Ruby 2.7.0p0
- Swift 5.7.3
- Swift 5.7
### Package Management
- cpan 1.64
- Helm 3.11.1
- Homebrew 4.0.1
- Miniconda 23.1.0
- Npm 9.3.1
- NuGet 6.3.1.1
- Helm 3.10.0
- Homebrew 3.6.2
- Miniconda 4.12.0
- Npm 8.15.0
- NuGet 6.2.1.2
- Pip 20.0.2
- Pip3 20.0.2
- Pipx 1.1.0
- RubyGems 3.1.2
- Vcpkg (build from commit a32522820)
- Vcpkg (build from master \<d52632d9a>)
- Yarn 1.22.19
##### Notes:
```
Location: /home/linuxbrew
Note: Homebrew is pre-installed on image but not added to PATH.
run the eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv) command
to accomplish this.
```
#### Environment variables
| Name | Value |
| ----------------------- | ---------------------- |
| CONDA | /usr/share/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
#### Homebrew note
```
Location: /home/linuxbrew
Note: Homebrew is pre-installed on image but not added to PATH.
run the eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" command
to accomplish this.
```
| VCPKG_ROOT | /usr/local/share/vcpkg |
### Project Management
- Ant 1.10.7
- Gradle 8.0.1
- Lerna 6.5.1
- Maven 3.8.7
- Sbt 1.8.2
- Gradle 7.5.1
- Lerna 5.5.2
- Maven 3.8.6
- Sbt 1.7.1
### Tools
- Ansible 2.13.7
- Ansible 2.13.4
- apt-fast 1.9.12
- AzCopy 10.17.0 - available by `azcopy` and `azcopy10` aliases
- Bazel 6.0.0
- AzCopy 10.16.0 (available by `azcopy` and `azcopy10` aliases)
- Bazel 5.3.1
- Bazelisk 1.13.2
- Bicep 0.14.46
- Buildah 1.22.3
- CMake 3.25.2
- CodeQL Action Bundles 2.12.1 2.12.2
- Bicep 0.10.61
- Buildah 1.22.3 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- CMake 3.24.2
- CodeQL Action Bundle 2.10.5
- Docker Amazon ECR Credential Helper 0.6.0
- Docker Compose v1 1.29.2
- Docker Compose v2 2.16.0+azure-2
- Docker-Buildx 0.10.3
- Docker-Moby Client 20.10.23+azure-2
- Docker-Moby Server 20.10.22+azure-1
- Fastlane 2.212.0
- Git 2.39.2
- Git LFS 3.3.0
- Docker Compose v2 2.11.0+azure-1
- Docker-Buildx 0.9.1
- Docker-Moby Client 20.10.18+azure-1
- Docker-Moby Server 20.10.18+azure-1
- Fastlane 2.210.1
- Git 2.37.3 (apt source repository: ppa:git-core/ppa)
- Git LFS 3.2.0 (apt source repository: https://packagecloud.io/install/repositories/github/git-lfs)
- Git-ftp 1.6.0
- Haveged 1.9.1
- Heroku 7.68.1
- HHVM (HipHop VM) 4.172.1
- Heroku 7.63.4
- HHVM (HipHop VM) 4.169.0
- jq 1.6
- Kind 0.17.0
- Kubectl 1.26.1
- Kustomize 5.0.0
- Leiningen 2.10.0
- Kind 0.15.0
- Kubectl 1.25.2
- Kustomize 4.5.7
- Leiningen 2.9.10
- MediaInfo 19.09
- Mercurial 5.3.1
- Minikube 1.29.0
- n 9.0.1
- Minikube 1.27.0
- n 9.0.0
- Newman 5.3.2
- nvm 0.39.3
- OpenSSL 1.1.1f-1ubuntu2.17
- Packer 1.8.6
- Parcel 2.8.3
- nvm 0.39.1
- OpenSSL 1.1.1f-1ubuntu2.16
- Packer 1.8.3
- Parcel 2.7.0
- PhantomJS 2.1.1
- Podman 3.4.2
- Pulumi 3.55.0
- R 4.2.2
- Skopeo 1.5.0
- Podman 3.4.2 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- Pulumi 3.40.1
- R 4.2.1
- Skopeo 1.5.0 (apt source repository: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable)
- Sphinx Open Source Search Server 2.2.11
- SVN 1.13.0
- Terraform 1.3.9
- yamllint 1.29.0
- yq 4.30.8
- zstd 1.5.4
- Terraform 1.3.0
- yamllint 1.28.0
- yq 4.27.5
- zstd 1.5.2 (homebrew)
### CLI Tools
- Alibaba Cloud CLI 3.0.149
- AWS CLI 2.10.1
- AWS CLI Session Manager Plugin 1.2.398.0
- AWS SAM CLI 1.73.0
- Azure CLI 2.45.0
- Azure CLI (azure-devops) 0.26.0
- GitHub CLI 2.23.0
- Google Cloud SDK 418.0.0
- Alibaba Cloud CLI 3.0.127
- AWS CLI 2.7.34
- AWS CLI Session manager plugin 1.2.339.0
- AWS SAM CLI 1.57.0
- Azure CLI (azure-cli) 2.40.0 (installation method: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt)
- Azure CLI (azure-devops) 0.25.0
- GitHub CLI 2.16.0
- Google Cloud SDK 403.0.0 (apt source repository: https://packages.cloud.google.com/apt)
- Hub CLI 2.14.2
- Netlify CLI 12.13.1
- OpenShift CLI 4.12.3
- ORAS CLI 0.16.0
- Vercel CLI 28.16.2
- Netlify CLI 11.8.2
- OpenShift CLI 4.11.5
- ORAS CLI 0.14.1
- Vercel CLI 28.4.1
### Java
| Version | Vendor | Environment Variable |
| -------------------- | --------------- | -------------------- |
| 8.0.362+9 | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.18+10 (default) | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.6+10 | Eclipse Temurin | JAVA_HOME_17_X64 |
| Version | Vendor | Environment Variable |
| ------------------- | --------------- | -------------------- |
| 8.0.345+1 | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.16+1 (default) | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.4+1 | Eclipse Temurin | JAVA_HOME_17_X64 |
### GraalVM
| Version | Environment variables |
| --------- | --------------------- |
| CE 22.3.1 | GRAALVM_11_ROOT |
| CE 22.2.0 | GRAALVM_11_ROOT |
### PHP Tools
- PHP: 7.4.33, 8.0.28, 8.1.16, 8.2.3
- Composer 2.5.4
- PHPUnit 8.5.32
### PHP
| Tool | Version |
| -------- | -------------------- |
| PHP | 7.4.30 8.0.23 8.1.10 |
| Composer | 2.4.2 |
| PHPUnit | 8.5.29 |
```
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
```
### Haskell Tools
### Haskell
- Cabal 3.6.2.0
- GHC 9.4.4
- GHCup 0.1.19.1
- Stack 2.9.3
- GHC 9.4.2
- GHCup 0.1.18.0
- Stack 2.9.1
### Rust Tools
- Cargo 1.67.1
- Rust 1.67.1
- Rustdoc 1.67.1
- Rustup 1.25.2
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.64.0
- Cargo audit 0.17.4
- Cargo clippy 0.1.67
- Cargo outdated 0.11.2
- Bindgen 0.60.1
- Cargo audit 0.17.0
- Cargo clippy 0.1.64
- Cargo outdated 0.11.1
- Cbindgen 0.24.3
- Rustfmt 1.5.1
### Browsers and Drivers
- Google Chrome 110.0.5481.100
- ChromeDriver 110.0.5481.77
- Chromium 110.0.5481.0
- Microsoft Edge 110.0.1587.50
- Microsoft Edge WebDriver 110.0.1587.50
- Selenium server 4.8.0
- Mozilla Firefox 110.0
- Geckodriver 0.32.2
- Google Chrome 105.0.5195.125
- ChromeDriver 105.0.5195.52
- Chromium 105.0.5177.0
- Microsoft Edge 105.0.1343.42 (apt source repository: https://packages.microsoft.com/repos/edge)
- Microsoft Edge WebDriver 105.0.1343.42
- Selenium server 4.4.0
- Mozilla Firefox 104.0
- Geckodriver 0.31.0
#### Environment variables
| Name | Value |
@@ -187,80 +188,87 @@ Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
| GECKOWEBDRIVER | /usr/local/share/gecko_driver |
| SELENIUM_JAR_PATH | /usr/share/java/selenium-server.jar |
### .NET Tools
- .NET Core SDK: 3.1.120, 3.1.202, 3.1.302, 3.1.426, 6.0.406, 7.0.103, 7.0.200
- nbgv 3.5.119+5d25f54fec
### .NET Core SDK
- 3.1.120 3.1.202 3.1.302 3.1.423 5.0.104 5.0.214 5.0.303 5.0.408 6.0.401
### .NET tools
- nbgv 3.5.113+a908c6d9d2
### Databases
- MongoDB 5.0.14
- MongoDB 5.0.12 (apt source repository: https://repo.mongodb.org/apt/ubuntu)
- sqlite3 3.31.1
#### PostgreSQL
- PostgreSQL 14.7
```
User: postgres
PostgreSQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
- PostgreSQL 14.5 (apt source repository: https://apt.postgresql.org/pub/repos/apt/)
- PostgreSQL Server (user:postgres)
```
PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
#### MySQL
- MySQL 8.0.32-0ubuntu0.20.04.2
```
User: root
Password: root
MySQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
- MySQL 8.0.30-0ubuntu0.20.04.2
- MySQL Server (user:root password:root)
#### MS SQL
```
MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
#### MS SQL Server Client Tools
- sqlcmd 17.10.0001.1
- SqlPackage 16.1.8089.0
- SqlPackage 16.0.6161.0
### Cached Tools
#### Go
- 1.17.13
- 1.18.10
- 1.19.6
- 1.18.6
- 1.19.1
#### Node.js
- 14.21.3
- 16.19.1
- 18.14.1
- 12.22.12
- 14.20.0
- 16.17.0
#### PyPy
- 2.7.18 [PyPy 7.3.9]
- 3.6.12 [PyPy 7.3.3]
- 3.7.13 [PyPy 7.3.9]
- 3.8.13 [PyPy 7.3.9]
- 3.9.12 [PyPy 7.3.9]
#### Python
- 2.7.18
- 3.6.15
- 3.7.15
- 3.8.16
- 3.9.16
- 3.10.10
- 3.11.2
#### PyPy
- 2.7.18 [PyPy 7.3.11]
- 3.6.12 [PyPy 7.3.3]
- 3.7.13 [PyPy 7.3.9]
- 3.8.16 [PyPy 7.3.11]
- 3.9.16 [PyPy 7.3.11]
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.7
#### Ruby
- 2.5.9
- 2.6.10
- 2.7.7
- 3.0.5
- 3.1.3
- 2.7.6
- 3.0.4
- 3.1.2
#### Environment variables
| Name | Value | Architecture |
| --------------- | ----------------------------------- | ------------ |
| GOROOT_1_17_X64 | /opt/hostedtoolcache/go/1.17.13/x64 | x64 |
| GOROOT_1_18_X64 | /opt/hostedtoolcache/go/1.18.6/x64 | x64 |
| GOROOT_1_19_X64 | /opt/hostedtoolcache/go/1.19.1/x64 | x64 |
### PowerShell Tools
- PowerShell 7.2.9
- PowerShell 7.2.6
#### PowerShell Modules
- Az: 9.3.0
- Az (Cached): 3.1.0.zip, 4.4.0.zip, 5.9.0.zip, 6.6.0.zip, 7.5.0.zip
- MarkdownPS: 1.9
- Microsoft.Graph: 1.22.0
- Pester: 5.4.0
- PSScriptAnalyzer: 1.21.0
| Module | Version |
| ---------------- | ------- |
| MarkdownPS | 1.9 |
| Microsoft.Graph | 1.12.0 |
| Pester | 5.3.3 |
| PSScriptAnalyzer | 1.20.0 |
#### Az PowerShell Modules
- 7.5.0 3.1.0.zip 4.4.0.zip 5.9.0.zip 6.6.0.zip
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
@@ -270,53 +278,53 @@ Use the following command as a part of your job to start the service: 'sudo syst
| nginx | 1.18.0 | /etc/nginx/nginx.conf | inactive | 80 |
### Android
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 9.0 |
| Android Emulator | 32.1.11 |
| Android SDK Build-tools | 33.0.0 33.0.1 33.0.2<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platform-Tools | 34.0.0 |
| Android SDK Platforms | android-33-ext4 (rev 1)<br>android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default) |
| SDK Patch Applier v4 | 1 |
| Package Name | Version |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.10 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platform-Tools | 33.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.1.8937393 (default) |
| SDK Patch Applier v4 | 1 |
#### Environment variables
| Name | Value |
| ----------------------- | ------------------------------------------- |
| ANDROID_HOME | /usr/local/lib/android/sdk |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_SDK_ROOT | /usr/local/lib/android/sdk |
### Cached Docker images
| Repository:Tag | Digest | Created |
| ----------------------- | ------------------------------------------------------------------------ | ---------- |
| alpine:3.14 | sha256:560e7a4fa5c891d1830f5591c80b8e472fa6cd386b7254cdf65ccc3249292a34 | 2023-02-11 |
| alpine:3.15 | sha256:689659b1f08e9fdfb85190144098c378beb5a53b328f7ced7883a74a1157c709 | 2023-02-11 |
| alpine:3.16 | sha256:1bd67c81e4ad4b8f4a5c1c914d7985336f130e5cefb3e323654fd09d6bcdbbe2 | 2023-02-11 |
| buildpack-deps:bullseye | sha256:40b14eb195795a586ac132c9b506253bc3e4ee7f48a63b685e5bf37e80b774cf | 2023-02-09 |
| buildpack-deps:buster | sha256:a3e4aaa53bf83302adfb9d8b9ba3996948e4605baac297921d3a173c14603748 | 2023-02-09 |
| alpine:3.12 | sha256:c75ac27b49326926b803b9ed43bf088bc220d22556de1bc5f72d742c91398f69 | 2022-04-05 |
| alpine:3.13 | sha256:100448e45467d4f3838fc8d95faab2965e22711b6edf67bbd8ec9c07f612b553 | 2022-08-09 |
| alpine:3.14 | sha256:1ab24b3b99320975cca71716a7475a65d263d0b6b604d9d14ce08f7a3f67595c | 2022-08-09 |
| buildpack-deps:bullseye | sha256:19683807e2587d777766573697f9488b0c88677ee06313e69197fbaa42e80319 | 2022-09-13 |
| buildpack-deps:buster | sha256:caa4ae706b59e2ca4b7786a44a08617447f81b516507a70a4ca43665b479c4e3 | 2022-09-13 |
| buildpack-deps:stretch | sha256:78e995165a5788c2f55aed6e548d8f6c1534830d4310c870408fccb2da8c5b2e | 2022-06-23 |
| debian:10 | sha256:233c3bbc892229c82da7231980d50adceba4db56a08c0b7053a4852782703459 | 2023-02-09 |
| debian:11 | sha256:43ef0c6c3585d5b406caa7a0f232ff5a19c1402aeb415f68bcd1cf9d10180af8 | 2023-02-09 |
| debian:10 | sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb | 2022-09-13 |
| debian:11 | sha256:3e82b1af33607aebaeb3641b75d6e80fd28d36e17993ef13708e9493e30e8ff9 | 2022-09-13 |
| debian:9 | sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be | 2022-06-23 |
| moby/buildkit:latest | sha256:751921dc37d2f842de38c9387f891fe6ae7d80f03d050ea98f780d7e0874ba00 | 2023-02-13 |
| node:14 | sha256:1b5300317e95ed8bb2a1c25003f57e52400ce7af1e2e1efd9f52407293f88317 | 2023-02-17 |
| node:14-alpine | sha256:86c59eb57b10df3d55e460b28799f60121f950ad018ff0989ea01ab61a1d9ab2 | 2023-02-17 |
| node:16 | sha256:a4baed9809deba446900d6e2bc6b92c3fe6ccff9ca2873f8d54e263595b02533 | 2023-02-17 |
| node:16-alpine | sha256:0fcf4fb718a763fa53ac8d60073a7cd7dc1520076e08ea0180591174122e52f3 | 2023-02-17 |
| node:18 | sha256:671b86a524e12beac53f6679d791dc8b73bff3a46edf4878343e82503cb33938 | 2023-02-17 |
| node:18-alpine | sha256:045b1a1c90bdfd8fcaad0769922aa16c401e31867d8bf5833365b0874884bbae | 2023-02-17 |
| ubuntu:16.04 | sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 | 2021-08-31 |
| ubuntu:18.04 | sha256:a3765b4d74747b5e9bdd03205b3fbc4fa19a02781c185f97f24c8f4f84ed7bbf | 2023-01-26 |
| ubuntu:20.04 | sha256:4a45212e9518f35983a976eead0de5eecc555a2f047134e9dd2cfc589076a00d | 2023-02-01 |
| moby/buildkit:latest | sha256:67c9251f9f2e103e1ee489b6cead518b6d82607ef485d3f1505fc4095a55ebeb | 2022-08-22 |
| node:12 | sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e | 2022-04-20 |
| node:12-alpine | sha256:d4b15b3d48f42059a15bd659be60afe21762aae9d6cbea6f124440895c27db68 | 2022-04-11 |
| node:14 | sha256:6adfb0c2a9db12a06893974bb140493a7482e2b3df59c058590594ceecd0c99b | 2022-09-13 |
| node:14-alpine | sha256:4aff4ba0da347e51561587eba037a38db4eaa70e1a6c8334d66779fe963d5be7 | 2022-08-09 |
| node:16 | sha256:a5d9200d3b8c17f0f3d7717034a9c215015b7aae70cb2a9d5e5dae7ff8aa6ca8 | 2022-09-13 |
| node:16-alpine | sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b | 2022-08-16 |
| ubuntu:16.04 | sha256:91bd29a464fdabfcf44e29e1f2a5f213c6dfa750b6290e40dd6998ac79da3c41 | 2021-08-31 |
| ubuntu:18.04 | sha256:6fec50623d6d37b7f3c14c5b6fc36c73fd04aa8173d59d54dba00da0e7ac50ee | 2022-09-06 |
| ubuntu:20.04 | sha256:35ab2bf57814e9ff49e365efd5a5935b6915eede5c7f8581e9e1b85e0eecbe16 | 2022-09-01 |
### Installed apt packages
| Name | Version |
@@ -325,15 +333,15 @@ Use the following command as a part of your job to start the service: 'sudo syst
| aria2 | 1.35.0-1build1 |
| autoconf | 2.69-11.1 |
| automake | 1:1.16.1-4ubuntu6 |
| binutils | 2.34-6ubuntu1.4 |
| binutils | 2.34-6ubuntu1.3 |
| bison | 2:3.5.1+dfsg-1 |
| brotli | 1.0.7-6ubuntu0.1 |
| build-essential | 12.8ubuntu1.1 |
| bzip2 | 1.0.8-2 |
| coreutils | 8.30-3ubuntu2 |
| curl | 7.68.0-1ubuntu2.15 |
| dbus | 1.12.16-2ubuntu2.3 |
| dnsutils | 1:9.16.1-0ubuntu2.12 |
| curl | 7.68.0-1ubuntu2.13 |
| dbus | 1.12.16-2ubuntu2.2 |
| dnsutils | 1:9.16.1-0ubuntu2.11 |
| dpkg | 1.19.7ubuntu3.2 |
| fakeroot | 1.24-1 |
| file | 1:5.38-4 |
@@ -346,10 +354,10 @@ Use the following command as a part of your job to start the service: 'sudo syst
| iproute2 | 5.5.0-1ubuntu1 |
| iputils-ping | 3:20190709-3 |
| jq | 1.6-1ubuntu0.20.04.1 |
| lib32z1 | 1:1.2.11.dfsg-2ubuntu1.5 |
| lib32z1 | 1:1.2.11.dfsg-2ubuntu1.3 |
| libc++-dev | 1:10.0-50\~exp1 |
| libc++abi-dev | 1:10.0-50\~exp1 |
| libcurl4 | 7.68.0-1ubuntu2.15 |
| libcurl4 | 7.68.0-1ubuntu2.13 |
| libgbm-dev | 21.2.6-0ubuntu0.1\~20.04.2 |
| libgconf-2-4 | 3.2.6-6ubuntu1 |
| libgsl-dev | 2.5+dfsg-6build1 |
@@ -358,12 +366,11 @@ Use the following command as a part of your job to start the service: 'sudo syst
| libmagickcore-dev | 8:6.9.10.23+dfsg-2.1ubuntu11.4 |
| libmagickwand-dev | 8:6.9.10.23+dfsg-2.1ubuntu11.4 |
| libsecret-1-dev | 0.20.4-0ubuntu1 |
| libsqlite3-dev | 3.31.1-4ubuntu0.5 |
| libsqlite3-dev | 3.31.1-4ubuntu0.4 |
| libtool | 2.4.6-14 |
| libunwind8 | 1.2.1-9build1 |
| libxkbfile-dev | 1:1.1.0-1 |
| libxss1 | 1:1.2.3-1 |
| libyaml-dev | 0.2.2-1 |
| locales | 2.31-0ubuntu9.9 |
| m4 | 1.4.18-4 |
| mediainfo | 19.09-1build1 |
@@ -383,24 +390,24 @@ Use the following command as a part of your job to start the service: 'sudo syst
| rsync | 3.1.3-8ubuntu0.4 |
| shellcheck | 0.7.0-2build2 |
| sphinxsearch | 2.2.11-2ubuntu2 |
| sqlite3 | 3.31.1-4ubuntu0.5 |
| sqlite3 | 3.31.1-4ubuntu0.4 |
| ssh | 1:8.2p1-4ubuntu0.5 |
| sshpass | 1.06-1 |
| subversion | 1.13.0-3ubuntu0.2 |
| sudo | 1.8.31-1ubuntu1.4 |
| sudo | 1.8.31-1ubuntu1.2 |
| swig | 4.0.1-5build1 |
| tar | 1.30+dfsg-7ubuntu0.20.04.2 |
| telnet | 0.17-41.2build1 |
| texinfo | 6.7.0.dfsg.2-5 |
| time | 1.7-25.1build1 |
| tk | 8.6.9+1 |
| tzdata | 2022g-0ubuntu0.20.04.1 |
| unzip | 6.0-25ubuntu1.1 |
| tzdata | 2022c-0ubuntu0.20.04.0 |
| unzip | 6.0-25ubuntu1 |
| upx | 3.95-2build1 |
| wget | 1.20.3-1ubuntu2 |
| xorriso | 1.5.2-1 |
| xvfb | 2:1.20.13-1ubuntu1\~20.04.6 |
| xvfb | 2:1.20.13-1ubuntu1\~20.04.3 |
| xz-utils | 5.2.4-1ubuntu1.1 |
| zip | 3.0-11build1 |
| zsync | 0.6.2-3ubuntu1 |
+202 -203
View File
@@ -1,54 +1,46 @@
| Announcements |
|-|
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 2022/08/08 and will be fully unsupported by 2023/04/01](https://github.com/actions/runner-images/issues/6002) |
| [[Ubuntu] homebrew will be removed from $PATH](https://github.com/actions/runner-images/issues/6283) |
| [The Ubuntu 18.04 Actions runner image will begin deprecation on 8/8/22 and will be fully unsupported by 4/1/2023](https://github.com/actions/runner-images/issues/6002) |
***
# Ubuntu 22.04
- OS Version: 22.04.2 LTS
- Kernel Version: 5.15.0-1033-azure
- Image Version: 20230227.2
# Ubuntu 22.04.1 LTS
- Linux kernel version: 5.15.0-1020-azure
- Image Version: 20220925.1
## Installed Software
### Language and Runtime
- Bash 5.1.16(1)-release
- Clang: 12.0.1, 13.0.1, 14.0.0
- Clang-format: 12.0.1, 13.0.1, 14.0.0
- Clang-tidy: 12.0.1, 13.0.1, 14.0.0
- Clang 12.0.1, 13.0.1, 14.0.0
- Clang-format 12.0.1, 13.0.1, 14.0.0
- Clang-tidy 12.0.1, 13.0.1, 14.0.0
- Dash 0.5.11+git20210903+057cd650a4ed-3build1
- GNU C++: 9.5.0, 10.4.0, 11.3.0, 12.1.0
- GNU Fortran: 9.5.0, 10.4.0, 11.3.0, 12.1.0
- Julia 1.8.5
- Kotlin 1.8.10-release-430
- Mono 6.12.0.182
- MSBuild 16.10.1.31701 (Mono 6.12.0.182)
- Node.js 18.14.2
- GNU C++ 9.4.0, 10.3.0, 11.2.0
- GNU Fortran 9.4.0, 10.3.0, 11.2.0
- Julia 1.8.1
- Kotlin 1.7.10-release-333
- Mono 6.12.0.182 (apt source repository: https://download.mono-project.com/repo/ubuntu stable-focal main)
- MSBuild 16.10.1.31701 (from /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node 16.17.1
- Perl 5.34.0
- Python 3.10.6
- Python3 3.10.6
- Ruby 3.0.2p107
- Swift 5.7.3
### Package Management
- cpan 1.64
- Helm 3.11.1
- Homebrew 4.0.4
- Miniconda 23.1.0
- Npm 9.5.0
- NuGet 6.3.1.1
- Helm 3.10.0
- Homebrew 3.6.2
- Miniconda 4.12.0
- Npm 8.15.0
- NuGet 6.2.1.2
- Pip 22.0.2
- Pip3 22.0.2
- Pipx 1.1.0
- RubyGems 3.3.5
- Vcpkg (build from commit 5626cee5c)
- Vcpkg (build from master \<57d3194e7>)
- Yarn 1.22.19
#### Environment variables
| Name | Value |
| ----------------------- | ---------------------- |
| CONDA | /usr/share/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
#### Homebrew note
##### Notes:
```
Location: /home/linuxbrew
Note: Homebrew is pre-installed on image but not added to PATH.
@@ -56,194 +48,206 @@ run the eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" command
to accomplish this.
```
#### Environment variables
| Name | Value |
| ----------------------- | ---------------------- |
| CONDA | /usr/share/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
| VCPKG_ROOT | /usr/local/share/vcpkg |
### Project Management
- Lerna 6.5.1
- Lerna 5.5.2
### Tools
- Ansible 2.14.3
- Ansible 2.13.4
- apt-fast 1.9.12
- AzCopy 10.17.0 - available by `azcopy` and `azcopy10` aliases
- Bazel 6.0.0
- AzCopy 10.16.0 (available by `azcopy` and `azcopy10` aliases)
- Bazel 5.3.1
- Bazelisk 1.13.2
- Bicep 0.14.85
- Bicep 0.10.61
- Buildah 1.23.1
- CMake 3.25.2
- CodeQL Action Bundles 2.12.2 2.12.3
- CMake 3.24.2
- CodeQL Action Bundle 2.10.5
- Docker Amazon ECR Credential Helper 0.6.0
- Docker Compose v1 1.29.2
- Docker Compose v2 2.16.0+azure-2
- Docker-Buildx 0.10.3
- Docker-Moby Client 20.10.23+azure-2
- Docker-Moby Server 20.10.22+azure-1
- Fastlane 2.212.1
- Git 2.39.2
- Git LFS 3.3.0
- Docker Compose v2 2.11.1+azure-1
- Docker-Buildx 0.9.1
- Docker-Moby Client 20.10.18+azure-1
- Docker-Moby Server 20.10.18+azure-1
- Fastlane 2.210.1
- Git 2.37.3 (apt source repository: ppa:git-core/ppa)
- Git LFS 3.2.0 (apt source repository: https://packagecloud.io/install/repositories/github/git-lfs)
- Git-ftp 1.6.0
- Haveged 1.9.14
- Heroku 7.68.2
- Heroku 7.63.4
- jq 1.6
- Kind 0.17.0
- Kubectl 1.26.1
- Kustomize 5.0.0
- Leiningen 2.10.0
- Kind 0.16.0
- Kubectl 1.25.2
- Kustomize 4.5.7
- Leiningen 2.9.10
- MediaInfo 21.09
- Mercurial 6.1.1
- Minikube 1.29.0
- n 9.0.1
- Minikube 1.27.0
- n 9.0.0
- Newman 5.3.2
- nvm 0.39.3
- OpenSSL 3.0.2-0ubuntu1.8
- Packer 1.8.6
- Parcel 2.8.3
- nvm 0.39.1
- OpenSSL 3.0.2-0ubuntu1.6
- Packer 1.8.3
- Parcel 2.7.0
- Podman 3.4.4
- Pulumi 3.55.0
- R 4.2.2
- Pulumi 3.40.1
- R 4.2.1
- Skopeo 1.4.1
- Sphinx Open Source Search Server 2.2.11
- SVN 1.14.1
- Terraform 1.3.9
- yamllint 1.29.0
- yq 4.31.1
- zstd 1.5.4
- Terraform 1.3.0
- yamllint 1.28.0
- yq 4.27.5
- zstd 1.5.2 (homebrew)
### CLI Tools
- Alibaba Cloud CLI 3.0.150
- AWS CLI 2.10.3
- AWS CLI Session Manager Plugin 1.2.398.0
- AWS SAM CLI 1.74.0
- Azure CLI 2.45.0
- Azure CLI (azure-devops) 0.26.0
- GitHub CLI 2.23.0
- Google Cloud SDK 419.0.0
- Alibaba Cloud CLI 3.0.127
- AWS CLI 2.7.35
- AWS CLI Session manager plugin 1.2.339.0
- AWS SAM CLI 1.57.0
- Azure CLI (azure-cli) 2.40.0 (installation method: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt)
- Azure CLI (azure-devops) 0.25.0
- GitHub CLI 2.16.0
- Google Cloud SDK 403.0.0 (apt source repository: https://packages.cloud.google.com/apt)
- Hub CLI 2.14.2
- Netlify CLI 13.0.0
- OpenShift CLI 4.12.4
- ORAS CLI 0.16.0
- Vercel CLI 28.16.7
- Netlify CLI 11.8.3
- OpenShift CLI 4.11.5
- ORAS CLI 0.14.1
- Vercel CLI 28.4.2
### Java
| Version | Vendor | Environment Variable |
| -------------------- | --------------- | -------------------- |
| 8.0.362+9 | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.18+10 (default) | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.6+10 | Eclipse Temurin | JAVA_HOME_17_X64 |
| Version | Vendor | Environment Variable |
| ------------------- | --------------- | -------------------- |
| 8.0.345+1 | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.16+1 (default) | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.4+1 | Eclipse Temurin | JAVA_HOME_17_X64 |
### GraalVM
| Version | Environment variables |
| --------- | --------------------- |
| CE 22.3.1 | GRAALVM_11_ROOT |
| CE 22.2.0 | GRAALVM_11_ROOT |
### PHP Tools
- PHP: 8.1.2
- Composer 2.5.4
- PHPUnit 8.5.33
### PHP
| Tool | Version |
| -------- | ------- |
| PHP | 8.1.10 |
| Composer | 2.4.2 |
| PHPUnit | 8.5.30 |
```
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
```
### Haskell Tools
### Haskell
- Cabal 3.6.2.0
- GHC 9.4.4
- GHCup 0.1.19.2
- Stack 2.9.3
- GHC 9.4.2
- GHCup 0.1.18.0
- Stack 2.9.1
### Rust Tools
- Cargo 1.67.1
- Rust 1.67.1
- Rustdoc 1.67.1
- Rustup 1.25.2
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.64.0
- Cargo audit 0.17.4
- Cargo clippy 0.1.67
- Cargo outdated 0.11.2
- Bindgen 0.60.1
- Cargo audit 0.17.0
- Cargo clippy 0.1.64
- Cargo outdated 0.11.1
- Cbindgen 0.24.3
- Rustfmt 1.5.1
### Browsers and Drivers
- Google Chrome 110.0.5481.177
- ChromeDriver 110.0.5481.77
- Chromium 110.0.5481.0
- Microsoft Edge 110.0.1587.57
- Microsoft Edge WebDriver 110.0.1587.57
- Selenium server 4.8.0
- Mozilla Firefox 110.0
- Geckodriver 0.32.2
- Google Chrome 105.0.5195.125
- ChromeDriver 105.0.5195.52
- Chromium 105.0.5177.0
- Microsoft Edge 105.0.1343.50 (apt source repository: https://packages.microsoft.com/repos/edge)
- Microsoft Edge WebDriver 105.0.1343.50
- Selenium server 4.4.0
#### Environment variables
| Name | Value |
| ----------------- | ----------------------------------- |
| CHROMEWEBDRIVER | /usr/local/share/chrome_driver |
| EDGEWEBDRIVER | /usr/local/share/edge_driver |
| GECKOWEBDRIVER | /usr/local/share/gecko_driver |
| GECKOWEBDRIVER | |
| SELENIUM_JAR_PATH | /usr/share/java/selenium-server.jar |
### .NET Tools
- .NET Core SDK: 6.0.406, 7.0.103, 7.0.201
- nbgv 3.5.119+5d25f54fec
### .NET Core SDK
- 6.0.401
### .NET tools
- nbgv 3.5.113+a908c6d9d2
### Databases
- sqlite3 3.37.2
#### PostgreSQL
- PostgreSQL 14.7
```
User: postgres
PostgreSQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
- PostgreSQL 14.5 (apt source repository: https://apt.postgresql.org/pub/repos/apt/)
- PostgreSQL Server (user:postgres)
```
PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'
```
#### MySQL
- MySQL 8.0.32-0ubuntu0.22.04.2
```
User: root
Password: root
MySQL service is disabled by default.
Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
- MySQL 8.0.30-0ubuntu0.22.04.1
- MySQL Server (user:root password:root)
#### MS SQL
```
MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'
```
#### MS SQL Server Client Tools
- sqlcmd 17.10.0001.1
- SqlPackage 16.1.8089.0
- SqlPackage 16.0.6296.0
### Cached Tools
#### Go
- 1.17.13
- 1.18.10
- 1.19.6
- 1.20.1
- 1.18.6
- 1.19.1
#### Node.js
- 14.21.3
- 16.19.1
- 18.14.2
#### Python
- 3.7.15
- 3.8.16
- 3.9.16
- 3.10.10
- 3.11.2
- 14.20.1
- 16.17.1
#### PyPy
- 3.7.13 [PyPy 7.3.9]
- 3.8.16 [PyPy 7.3.11]
- 3.9.16 [PyPy 7.3.11]
- 3.8.13 [PyPy 7.3.9]
- 3.9.12 [PyPy 7.3.9]
#### Python
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.7
#### Ruby
- 3.1.3
- 3.1.2
#### Environment variables
| Name | Value | Architecture |
| --------------- | ----------------------------------- | ------------ |
| GOROOT_1_17_X64 | /opt/hostedtoolcache/go/1.17.13/x64 | x64 |
| GOROOT_1_18_X64 | /opt/hostedtoolcache/go/1.18.6/x64 | x64 |
| GOROOT_1_19_X64 | /opt/hostedtoolcache/go/1.19.1/x64 | x64 |
### PowerShell Tools
- PowerShell 7.2.10
- PowerShell 7.2.6
#### PowerShell Modules
- Az: 9.3.0
- MarkdownPS: 1.9
- Microsoft.Graph: 1.22.0
- Pester: 5.4.0
- PSScriptAnalyzer: 1.21.0
| Module | Version |
| ---------------- | ------- |
| MarkdownPS | 1.9 |
| Microsoft.Graph | 1.11.1 |
| Pester | 5.3.3 |
| PSScriptAnalyzer | 1.20.0 |
#### Az PowerShell Modules
- 7.5.0
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
@@ -252,51 +256,48 @@ Use the following command as a part of your job to start the service: 'sudo syst
| nginx | 1.18.0 | /etc/nginx/nginx.conf | inactive | 80 |
### Android
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 9.0 |
| Android Emulator | 32.1.11 |
| Android SDK Build-tools | 33.0.0 33.0.1 33.0.2<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platform-Tools | 34.0.0 |
| Android SDK Platforms | android-33-ext4 (rev 1)<br>android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default) |
| SDK Patch Applier v4 | 1 |
| Package Name | Version |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.11 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platform-Tools | 33.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Tools | 26.1.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.1.8937393 (default) |
| SDK Patch Applier v4 | 1 |
#### Environment variables
| Name | Value |
| ----------------------- | ------------------------------------------- |
| ANDROID_HOME | /usr/local/lib/android/sdk |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_LATEST_HOME | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_ROOT | /usr/local/lib/android/sdk/ndk/25.1.8937393 |
| ANDROID_SDK_ROOT | /usr/local/lib/android/sdk |
### Cached Docker images
| Repository:Tag | Digest | Created |
| ----------------------- | ------------------------------------------------------------------------ | ---------- |
| alpine:3.14 | sha256:560e7a4fa5c891d1830f5591c80b8e472fa6cd386b7254cdf65ccc3249292a34 | 2023-02-11 |
| alpine:3.15 | sha256:689659b1f08e9fdfb85190144098c378beb5a53b328f7ced7883a74a1157c709 | 2023-02-11 |
| alpine:3.16 | sha256:1bd67c81e4ad4b8f4a5c1c914d7985336f130e5cefb3e323654fd09d6bcdbbe2 | 2023-02-11 |
| buildpack-deps:bullseye | sha256:40b14eb195795a586ac132c9b506253bc3e4ee7f48a63b685e5bf37e80b774cf | 2023-02-09 |
| buildpack-deps:buster | sha256:a3e4aaa53bf83302adfb9d8b9ba3996948e4605baac297921d3a173c14603748 | 2023-02-09 |
| debian:10 | sha256:233c3bbc892229c82da7231980d50adceba4db56a08c0b7053a4852782703459 | 2023-02-09 |
| debian:11 | sha256:43ef0c6c3585d5b406caa7a0f232ff5a19c1402aeb415f68bcd1cf9d10180af8 | 2023-02-09 |
| moby/buildkit:latest | sha256:751921dc37d2f842de38c9387f891fe6ae7d80f03d050ea98f780d7e0874ba00 | 2023-02-13 |
| node:14 | sha256:1b5300317e95ed8bb2a1c25003f57e52400ce7af1e2e1efd9f52407293f88317 | 2023-02-17 |
| node:14-alpine | sha256:86c59eb57b10df3d55e460b28799f60121f950ad018ff0989ea01ab61a1d9ab2 | 2023-02-17 |
| node:16 | sha256:a4baed9809deba446900d6e2bc6b92c3fe6ccff9ca2873f8d54e263595b02533 | 2023-02-17 |
| node:16-alpine | sha256:029a85552a270cd6dfae0ec222465f1deacfaf7cee030981b7ff6acd6a0eaf33 | 2023-02-21 |
| node:18 | sha256:586cdef48f920dea2f47a954b8717601933aa1daa0a08264abf9144789abf8ae | 2023-02-22 |
| node:18-alpine | sha256:0d2712ac2b2c1149391173de670406f6e3dbdb1b2ba44e8530647e623e0e1b17 | 2023-02-22 |
| ubuntu:18.04 | sha256:a3765b4d74747b5e9bdd03205b3fbc4fa19a02781c185f97f24c8f4f84ed7bbf | 2023-01-26 |
| ubuntu:20.04 | sha256:4a45212e9518f35983a976eead0de5eecc555a2f047134e9dd2cfc589076a00d | 2023-02-01 |
| ubuntu:22.04 | sha256:9a0bdde4188b896a372804be2384015e90e3f84906b750c1a53539b585fbbe7f | 2023-01-26 |
| alpine:3.14 | sha256:1ab24b3b99320975cca71716a7475a65d263d0b6b604d9d14ce08f7a3f67595c | 2022-08-09 |
| alpine:3.15 | sha256:69463fdff1f025c908939e86d4714b4d5518776954ca627cbeff4c74bcea5b22 | 2022-08-09 |
| buildpack-deps:bullseye | sha256:19683807e2587d777766573697f9488b0c88677ee06313e69197fbaa42e80319 | 2022-09-13 |
| buildpack-deps:buster | sha256:caa4ae706b59e2ca4b7786a44a08617447f81b516507a70a4ca43665b479c4e3 | 2022-09-13 |
| debian:10 | sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb | 2022-09-13 |
| debian:11 | sha256:3e82b1af33607aebaeb3641b75d6e80fd28d36e17993ef13708e9493e30e8ff9 | 2022-09-13 |
| moby/buildkit:latest | sha256:67c9251f9f2e103e1ee489b6cead518b6d82607ef485d3f1505fc4095a55ebeb | 2022-08-22 |
| node:14 | sha256:6adfb0c2a9db12a06893974bb140493a7482e2b3df59c058590594ceecd0c99b | 2022-09-13 |
| node:14-alpine | sha256:4aff4ba0da347e51561587eba037a38db4eaa70e1a6c8334d66779fe963d5be7 | 2022-08-09 |
| node:16 | sha256:a5d9200d3b8c17f0f3d7717034a9c215015b7aae70cb2a9d5e5dae7ff8aa6ca8 | 2022-09-13 |
| node:16-alpine | sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b | 2022-08-16 |
| ubuntu:18.04 | sha256:6fec50623d6d37b7f3c14c5b6fc36c73fd04aa8173d59d54dba00da0e7ac50ee | 2022-09-06 |
| ubuntu:20.04 | sha256:35ab2bf57814e9ff49e365efd5a5935b6915eede5c7f8581e9e1b85e0eecbe16 | 2022-09-01 |
| ubuntu:22.04 | sha256:20fa2d7bb4de7723f542be5923b06c4d704370f0390e4ae9e1c833c8785644c1 | 2022-09-01 |
### Installed apt packages
| Name | Version |
@@ -305,20 +306,20 @@ Use the following command as a part of your job to start the service: 'sudo syst
| aria2 | 1.36.0-1 |
| autoconf | 2.71-2 |
| automake | 1:1.16.5-1.3 |
| binutils | 2.38-4ubuntu2.1 |
| binutils | 2.38-3ubuntu1 |
| bison | 2:3.8.2+dfsg-1build1 |
| brotli | 1.0.9-2build6 |
| build-essential | 12.9ubuntu3 |
| bzip2 | 1.0.8-5build1 |
| coreutils | 8.32-4.1ubuntu1 |
| curl | 7.81.0-1ubuntu1.8 |
| dbus | 1.12.20-2ubuntu4.1 |
| dnsutils | 1:9.18.1-1ubuntu1.3 |
| curl | 7.81.0-1ubuntu1.4 |
| dbus | 1.12.20-2ubuntu4 |
| dnsutils | 1:9.18.1-1ubuntu1.2 |
| dpkg | 1.21.1ubuntu2.1 |
| fakeroot | 1.28-1ubuntu1 |
| file | 1:5.41-3 |
| flex | 2.6.4-8build2 |
| fonts-noto-color-emoji | 2.038-0ubuntu1 |
| fonts-noto-color-emoji | 2.034-1 |
| ftp | 20210827-4build1 |
| gnupg2 | 2.2.27-3ubuntu2.1 |
| haveged | 1.9.14-1ubuntu1 |
@@ -326,11 +327,11 @@ Use the following command as a part of your job to start the service: 'sudo syst
| iproute2 | 5.15.0-1ubuntu2 |
| iputils-ping | 3:20211215-1 |
| jq | 1.6-2.1ubuntu3 |
| lib32z1 | 1:1.2.11.dfsg-2ubuntu9.2 |
| lib32z1 | 1:1.2.11.dfsg-2ubuntu9.1 |
| libc++-dev | 1:14.0-55\~exp2 |
| libc++abi-dev | 1:14.0-55\~exp2 |
| libcurl4 | 7.81.0-1ubuntu1.8 |
| libgbm-dev | 22.2.5-0ubuntu0.1\~22.04.1 |
| libcurl4 | 7.81.0-1ubuntu1.4 |
| libgbm-dev | 22.0.5-0ubuntu0.1 |
| libgconf-2-4 | 3.2.6-7ubuntu2 |
| libgsl-dev | 2.7.1+dfsg-3 |
| libgtk-3-0 | 3.24.33-1ubuntu2 |
@@ -338,21 +339,19 @@ Use the following command as a part of your job to start the service: 'sudo syst
| libmagickcore-dev | 8:6.9.11.60+dfsg-1.3build2 |
| libmagickwand-dev | 8:6.9.11.60+dfsg-1.3build2 |
| libsecret-1-dev | 0.20.5-2 |
| libsqlite3-dev | 3.37.2-2ubuntu0.1 |
| libssl-dev | 3.0.2-0ubuntu1.8 |
| libsqlite3-dev | 3.37.2-2 |
| libssl-dev | 3.0.2-0ubuntu1.6 |
| libtool | 2.4.6-15build2 |
| libunwind8 | 1.3.2-2build2 |
| libxkbfile-dev | 1:1.1.0-1build3 |
| libxss1 | 1:1.2.3-1build2 |
| libyaml-dev | 0.2.2-1build2 |
| locales | 2.35-0ubuntu3.1 |
| lz4 | 1.9.3-2build2 |
| m4 | 1.4.18-5ubuntu2 |
| mediainfo | 22.03-1 |
| mercurial | 6.1.1-1ubuntu1 |
| net-tools | 1.60+git20181103.0eebece-1ubuntu5 |
| netcat | 1.218-4ubuntu1 |
| openssh-client | 1:8.9p1-3ubuntu0.1 |
| openssh-client | 1:8.9p1-3 |
| p7zip-full | 16.02+dfsg-8 |
| p7zip-rar | 16.02-3build1 |
| parallel | 20210822+ds-2 |
@@ -362,27 +361,27 @@ Use the following command as a part of your job to start the service: 'sudo syst
| pollinate | 4.33-3ubuntu2 |
| python-is-python3 | 3.9.2-2 |
| rpm | 4.17.0+dfsg1-4build1 |
| rsync | 3.2.3-8ubuntu3.1 |
| rsync | 3.2.3-8ubuntu3 |
| shellcheck | 0.8.0-2 |
| sphinxsearch | 2.2.11-8 |
| sqlite3 | 3.37.2-2ubuntu0.1 |
| ssh | 1:8.9p1-3ubuntu0.1 |
| sqlite3 | 3.37.2-2 |
| ssh | 1:8.9p1-3 |
| sshpass | 1.09-1 |
| subversion | 1.14.1-3ubuntu0.22.04.1 |
| sudo | 1.9.9-1ubuntu2.2 |
| sudo | 1.9.9-1ubuntu2 |
| swig | 4.0.2-1ubuntu1 |
| tar | 1.34+dfsg-1build3 |
| telnet | 0.17-44build1 |
| texinfo | 6.8-4build1 |
| time | 1.9-0.1build2 |
| tk | 8.6.11+1build2 |
| tzdata | 2022g-0ubuntu0.22.04.1 |
| unzip | 6.0-26ubuntu3.1 |
| tzdata | 2022c-0ubuntu0.22.04.0 |
| unzip | 6.0-26ubuntu3 |
| upx | 3.96-3 |
| wget | 1.21.2-2ubuntu1 |
| xorriso | 1.5.4-2 |
| xvfb | 2:21.1.3-2ubuntu2.7 |
| xvfb | 2:21.1.3-2ubuntu2.1 |
| xz-utils | 5.2.5-2ubuntu1 |
| zip | 3.0-12build2 |
| zsync | 0.6.2-3ubuntu1 |
@@ -1,61 +1,67 @@
function Get-ChromeVersion {
$googleChromeVersion = google-chrome --version | Take-OutputPart -Part 2
return $googleChromeVersion
return "Google Chrome $googleChromeVersion"
}
function Get-ChromeDriverVersion {
$chromeDriverVersion = chromedriver --version | Take-OutputPart -Part 1
return $chromeDriverVersion
return "ChromeDriver $chromeDriverVersion"
}
function Get-FirefoxVersion {
$firefoxVersion = $(firefox --version) | Take-OutputPart -Part 2
$firefoxVersion = firefox --version
return $firefoxVersion
}
function Get-GeckodriverVersion {
$geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-OutputPart -Part 1
return $geckodriverVersion
return "Geckodriver $geckodriverVersion"
}
function Get-ChromiumVersion {
$chromiumVersion = chromium-browser --version | Take-OutputPart -Part 1
$chromiumVersion = chromium-browser --version | Take-OutputPart -Part 0,1
return $chromiumVersion
}
function Get-EdgeVersion {
$edgeVersion = (microsoft-edge --version).Trim() | Take-OutputPart -Part 2
return $edgeVersion
$edgeVersion = (microsoft-edge --version).trim()
$aptSourceRepo = Get-AptSourceRepository -PackageName "microsoft-edge"
return "$edgeVersion (apt source repository: $aptSourceRepo)"
}
function Get-EdgeDriverVersion {
$edgeDriverVersion = msedgedriver --version | Take-OutputPart -Part 3
$edgeDriverVersion = msedgedriver --version | Take-OutputPart -Part 0,1,2,3
return $edgeDriverVersion
}
function Get-SeleniumVersion {
$seleniumBinaryName = Get-ToolsetValue "selenium.binary_name"
$fullSeleniumVersion = (Get-ChildItem "/usr/share/java/${seleniumBinaryName}-*").Name -replace "${seleniumBinaryName}-"
return $fullSeleniumVersion
return "Selenium server $fullSeleniumVersion"
}
function Build-BrowserWebdriversEnvironmentTable {
return @(
[PSCustomObject] @{
@{
"Name" = "CHROMEWEBDRIVER"
"Value" = $env:CHROMEWEBDRIVER
},
[PSCustomObject] @{
@{
"Name" = "EDGEWEBDRIVER"
"Value" = $env:EDGEWEBDRIVER
},
[PSCustomObject] @{
@{
"Name" = "GECKOWEBDRIVER"
"Value" = $env:GECKOWEBDRIVER
},
[PSCustomObject] @{
@{
"Name" = "SELENIUM_JAR_PATH"
"Value" = $env:SELENIUM_JAR_PATH
}
)
) | ForEach-Object {
[PSCustomObject] @{
"Name" = $_.Name
"Value" = $_.Value
}
}
}
@@ -27,3 +27,37 @@ function Get-ToolcacheGoVersions {
$toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "go"
return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
}
function Build-GoEnvironmentTable {
return Get-CachedToolInstances -Name "go" -VersionCommand "version" | ForEach-Object {
$Version = [System.Version]($_.Version -Split(" "))[0]
$Name = "GOROOT_$($Version.major)_$($Version.minor)_X64"
$Value = (Get-Item env:\$Name).Value
[PSCustomObject] @{
"Name" = $Name
"Value" = (Get-Item env:\$Name).Value
"Architecture" = $_. Architecture
}
}
}
function Build-CachedToolsSection {
$output = ""
$output += New-MDHeader "Go" -Level 4
$output += New-MDList -Lines (Get-ToolcacheGoVersions) -Style Unordered
$output += New-MDHeader "Node.js" -Level 4
$output += New-MDList -Lines (Get-ToolcacheNodeVersions) -Style Unordered
$output += New-MDHeader "PyPy" -Level 4
$output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered
$output += New-MDHeader "Python" -Level 4
$output += New-MDList -Lines (Get-ToolcachePythonVersions) -Style Unordered
$output += New-MDHeader "Ruby" -Level 4
$output += New-MDList -Lines (Get-ToolcacheRubyVersions) -Style Unordered
return $output
}
@@ -1,11 +1,11 @@
function Get-BashVersion {
$version = bash -c 'echo ${BASH_VERSION}'
return $version
return "Bash $version"
}
function Get-DashVersion {
$version = dpkg-query -W -f '${Version}' dash
return $version
return "Dash $version"
}
function Get-CPPVersions {
@@ -13,7 +13,7 @@ function Get-CPPVersions {
$cppVersions = $result.Output | Where-Object { $_ -match "g\+\+-\d+"} | ForEach-Object {
& $_.Split("/")[0] --version | Select-Object -First 1 | Take-OutputPart -Part 3
} | Sort-Object {[Version]$_}
return $cppVersions
return "GNU C++ " + ($cppVersions -Join ", ")
}
function Get-FortranVersions {
@@ -22,7 +22,7 @@ function Get-FortranVersions {
$_ -match "now (?<version>\d+\.\d+\.\d+)-" | Out-Null
$Matches.version
} | Sort-Object {[Version]$_}
return $fortranVersions
return "GNU Fortran " + ($fortranVersions -Join ", ")
}
function Get-ClangToolVersions {
@@ -42,185 +42,211 @@ function Get-ClangToolVersions {
}
} | Sort-Object {[Version]$_}
return $toolVersions
return $toolVersions -Join ", "
}
function Get-ClangVersions {
$clangVersions = Get-ClangToolVersions -ToolName "clang"
return "Clang $clangVersions"
}
function Get-ClangFormatVersions {
$clangFormatVersions = Get-ClangToolVersions -ToolName "clang-format"
return "Clang-format $clangFormatVersions"
}
function Get-ClangTidyVersions {
return Get-ClangToolVersions -ToolName "clang-tidy" -VersionLineMatcher "LLVM version" -VersionPattern "\d+\.\d+\.\d+)"
$clangFormatVersions = Get-ClangToolVersions -ToolName "clang-tidy" -VersionLineMatcher "LLVM version" -VersionPattern "\d+\.\d+\.\d+)"
return "Clang-tidy $clangFormatVersions"
}
function Get-ErlangVersion {
$erlangVersion = (erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), ''OTP_VERSION''])), io:fwrite(Version), halt().' -noshell)
$shellVersion = (erl -eval 'erlang:display(erlang:system_info(version)), halt().' -noshell).Trim('"')
return "$erlangVersion (Eshell $shellVersion)"
return "Erlang $erlangVersion (Eshell $shellVersion)"
}
function Get-ErlangRebar3Version {
$result = Get-CommandResult "rebar3 --version"
$result.Output -match "rebar (?<version>(\d+.){2}\d+)" | Out-Null
return $Matches.version
$rebarVersion = $Matches.version
return "Erlang rebar3 $rebarVersion"
}
function Get-MonoVersion {
$monoVersion = mono --version | Out-String | Take-OutputPart -Part 4
return $monoVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "mono"
return "Mono $monoVersion (apt source repository: $aptSourceRepo)"
}
function Get-MsbuildVersion {
$msbuildVersion = msbuild -version | Select-Object -Last 1
$monoVersion = Get-MonoVersion
return "$msbuildVersion (Mono $monoVersion)"
$result = Select-String -Path (Get-Command msbuild).Source -Pattern "msbuild"
$result -match "(?<path>\/\S*\.dll)" | Out-Null
$msbuildPath = $Matches.path
return "MSBuild $msbuildVersion (from $msbuildPath)"
}
function Get-NuGetVersion {
$nugetVersion = nuget help | Select-Object -First 1 | Take-OutputPart -Part 2
return $nugetVersion
return "NuGet $nugetVersion"
}
function Get-NodeVersion {
$nodeVersion = $(node --version).Substring(1)
return $nodeVersion
return "Node $nodeVersion"
}
function Get-OpensslVersion {
return $(dpkg-query -W -f '${Version}' openssl)
return "OpenSSL $(dpkg-query -W -f '${Version}' openssl)"
}
function Get-PerlVersion {
$version = $(perl -e 'print substr($^V,1)')
return $version
return "Perl $version"
}
function Get-PythonVersion {
$result = Get-CommandResult "python --version"
$version = $result.Output | Take-OutputPart -Part 1
return $version
return "Python $version"
}
function Get-Python3Version {
$result = Get-CommandResult "python3 --version"
$version = $result.Output | Take-OutputPart -Part 1
return $version
return "Python3 $version"
}
function Get-PowershellVersion {
return $(pwsh --version) | Take-OutputPart -Part 1
return $(pwsh --version)
}
function Get-RubyVersion {
$rubyVersion = ruby --version | Out-String | Take-OutputPart -Part 1
return $rubyVersion
return "Ruby $rubyVersion"
}
function Get-SwiftVersion {
$swiftVersion = swift --version | Out-String | Take-OutputPart -Part 2
return $swiftVersion
return "Swift $swiftVersion"
}
function Get-KotlinVersion {
$kotlinVersion = kotlin -version | Out-String | Take-OutputPart -Part 2
return $kotlinVersion
return "Kotlin $kotlinVersion"
}
function Get-JuliaVersion {
$juliaVersion = julia --version | Take-OutputPart -Part 2
return $juliaVersion
return "Julia $juliaVersion"
}
function Get-LernaVersion {
$version = lerna -v
return $version
return "Lerna $version"
}
function Get-HomebrewVersion {
$result = Get-CommandResult "/home/linuxbrew/.linuxbrew/bin/brew -v"
$result.Output -match "Homebrew (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$version = $Matches.version
return "Homebrew $version"
}
function Get-CpanVersion {
$result = Get-CommandResult "cpan --version" -ExpectExitCode @(25, 255)
$result.Output -match "version (?<version>\d+\.\d+) " | Out-Null
return $Matches.version
$cpanVersion = $Matches.version
return "cpan $cpanVersion"
}
function Get-GemVersion {
$result = Get-CommandResult "gem --version"
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$gemVersion = $Matches.version
return "RubyGems $gemVersion"
}
function Get-MinicondaVersion {
$condaVersion = conda --version | Take-OutputPart -Part 1
return $condaVersion
$condaVersion = conda --version
return "Mini$condaVersion"
}
function Get-HelmVersion {
$(helm version) -match 'Version:"v(?<version>\d+\.\d+\.\d+)"' | Out-Null
return $Matches.version
$helmVersion = $Matches.version
return "Helm $helmVersion"
}
function Get-NpmVersion {
$npmVersion = npm --version
return $npmVersion
return "Npm $npmVersion"
}
function Get-YarnVersion {
$yarnVersion = yarn --version
return $yarnVersion
return "Yarn $yarnVersion"
}
function Get-ParcelVersion {
$parcelVersion = parcel --version
return $parcelVersion
return "Parcel $parcelVersion"
}
function Get-PipVersion {
$result = Get-CommandResult "pip --version"
$result.Output -match "pip (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$pipVersion = $Matches.version
return "Pip $pipVersion"
}
function Get-Pip3Version {
$result = Get-CommandResult "pip3 --version"
$result.Output -match "pip (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$pipVersion = $Matches.version
return "Pip3 $pipVersion"
}
function Get-VcpkgVersion {
$result = Get-CommandResult "vcpkg version"
$result.Output -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
$vcpkgVersion = $Matches.version
$commitId = git -C "/usr/local/share/vcpkg" rev-parse --short HEAD
return "(build from commit $commitId)"
return "Vcpkg $vcpkgVersion (build from master \<$commitId>)"
}
function Get-AntVersion {
$result = ant -version | Out-String
$result -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$antVersion = $Matches.version
return "Ant $antVersion"
}
function Get-GradleVersion {
$gradleVersion = (gradle -v) -match "^Gradle \d" | Take-OutputPart -Part 1
return $gradleVersion
return "Gradle $gradleVersion"
}
function Get-MavenVersion {
$result = mvn -version | Out-String
$result -match "Apache Maven (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$mavenVersion = $Matches.version
return "Maven $mavenVersion"
}
function Get-SbtVersion {
$result = Get-CommandResult "sbt -version"
$result.Output -match "sbt script version: (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$sbtVersion = $Matches.version
return "Sbt $sbtVersion"
}
function Get-PHPVersions {
$result = Get-CommandResult "apt list --installed" -Multiline
return $result.Output | Where-Object { $_ -match "^php\d+\.\d+/"} | ForEach-Object {
$_ -match "now (\d+:)?(?<version>\d+\.\d+\.\d+)" | Out-Null
$_ -match "now (\d+:)?(?<version>\d+\.\d+\.\d+)-" | Out-Null
$Matches.version
}
}
@@ -235,24 +261,60 @@ function Get-PHPUnitVersion {
return $Matches.version
}
function Build-PHPTable {
$php = @{
"Tool" = "PHP"
"Version" = "$(Get-PHPVersions -Join '<br>')"
}
$composer = @{
"Tool" = "Composer"
"Version" = Get-ComposerVersion
}
$phpunit = @{
"Tool" = "PHPUnit"
"Version" = Get-PHPUnitVersion
}
return @($php, $composer, $phpunit) | ForEach-Object {
[PSCustomObject] @{
"Tool" = $_.Tool
"Version" = $_.Version
}
}
}
function Build-PHPSection {
$output = ""
$output += New-MDHeader "PHP" -Level 3
$output += Build-PHPTable | New-MDTable
$output += New-MDCode -Lines @(
"Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled."
)
return $output
}
function Get-GHCVersion {
$(ghc --version) -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$ghcVersion = $Matches.version
return "GHC $ghcVersion"
}
function Get-GHCupVersion {
$(ghcup --version) -match "version (?<version>\d+(\.\d+){2,})" | Out-Null
return $Matches.version
$(ghcup --version) -match "version v(?<version>\d+(\.\d+){2,})" | Out-Null
$ghcVersion = $Matches.version
return "GHCup $ghcVersion"
}
function Get-CabalVersion {
$(cabal --version | Out-String) -match "cabal-install version (?<version>\d+\.\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$cabalVersion = $Matches.version
return "Cabal $cabalVersion"
}
function Get-StackVersion {
$(stack --version | Out-String) -match "Version (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.version
$stackVersion = $Matches.version
return "Stack $stackVersion"
}
function Get-AzModuleVersions {
@@ -265,40 +327,38 @@ function Get-AzModuleVersions {
}
function Get-PowerShellModules {
[Array] $result = @()
$modules = (Get-ToolsetContent).powershellModules.name
[Array] $azureInstalledModules = Get-ChildItem -Path "/usr/share/az_*" -Directory | ForEach-Object { $_.Name.Split("_")[1] }
if ($azureInstalledModules.Count -gt 0) {
$result += [ToolVersionsListNode]::new("Az", $azureInstalledModules, "^\d+\.\d+", "Inline")
$psModules = Get-Module -Name $modules -ListAvailable | Sort-Object Name | Group-Object Name
$psModules | ForEach-Object {
$moduleName = $_.Name
$moduleVersions = ($_.group.Version | Sort-Object -Unique) -join '<br>'
[PSCustomObject]@{
Module = $moduleName
Version = $moduleVersions
}
}
[Array] $azureCachedModules = Get-ChildItem /usr/share/az_*.zip -File | ForEach-Object { $_.Name.Split("_")[1] }
if ($azureCachedModules.Count -gt 0) {
$result += [ToolVersionsListNode]::new("Az (Cached)", $azureCachedModules, "^\d+\.\d+", "Inline")
}
(Get-ToolsetContent).powershellModules.name | ForEach-Object {
$moduleName = $_
$moduleVersions = Get-Module -Name $moduleName -ListAvailable | Select-Object -ExpandProperty Version | Sort-Object -Unique
$result += [ToolVersionsListNode]::new($moduleName, $moduleVersions, "^\d+", "Inline")
}
return $result
}
function Get-DotNetCoreSdkVersions {
$dotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 }
$unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 }
$dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join " "
return $dotNetCoreSdkVersion
}
function Get-DotnetTools {
$env:PATH = "/etc/skel/.dotnet/tools:$($env:PATH)"
$dotnetTools = (Get-ToolsetContent).dotnet.tools
return $dotnetTools | ForEach-Object {
$version = Invoke-Expression $_.getversion
return [ToolVersionNode]::new($_.name, $version)
$toolsList = @()
ForEach ($dotnetTool in $dotnetTools) {
$toolsList += $dotnetTool.name + " " + (Invoke-Expression $dotnetTool.getversion)
}
return $toolsList
}
function Get-CachedDockerImages {
@@ -341,7 +401,8 @@ function Get-AptPackages {
function Get-PipxVersion {
$result = (Get-CommandResult "pipx --version").Output
$result -match "(?<version>\d+\.\d+\.\d+\.?\d*)" | Out-Null
return $Matches.Version
$pipxVersion = $Matches.Version
return "Pipx $pipxVersion"
}
function Get-GraalVMVersion {
@@ -361,13 +422,22 @@ function Build-GraalVMTable {
function Build-PackageManagementEnvironmentTable {
return @(
[PSCustomObject] @{
@{
"Name" = "CONDA"
"Value" = $env:CONDA
},
[PSCustomObject] @{
@{
"Name" = "VCPKG_INSTALLATION_ROOT"
"Value" = $env:VCPKG_INSTALLATION_ROOT
},
@{
"Name" = "VCPKG_ROOT"
"Value" = $env:VCPKG_ROOT
}
)
) | ForEach-Object {
[PSCustomObject] @{
"Name" = $_.Name
"Value" = $_.Value
}
}
}
@@ -1,16 +1,18 @@
function Get-PostgreSqlVersion {
$postgreSQLVersion = psql --version | Take-OutputPart -Part 2
return $postgreSQLVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "postgresql"
return "PostgreSQL $postgreSQLVersion (apt source repository: $aptSourceRepo)"
}
function Get-MongoDbVersion {
$mongoDBVersion = mongod --version | Select-Object -First 1 | Take-OutputPart -Part 2 -Delimiter "v"
return $mongoDBVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "mongodb"
return "MongoDB $mongoDBVersion (apt source repository: $aptSourceRepo)"
}
function Get-SqliteVersion {
$sqliteVersion = sqlite3 --version | Take-OutputPart -Part 0
return $sqliteVersion
return "sqlite3 $sqliteVersion"
}
function Get-MySQLVersion {
@@ -18,47 +20,57 @@ function Get-MySQLVersion {
if (Test-IsUbuntu18) {
$mySQLVersion = $mySQLVersion | Take-OutputPart -Part 0 -Delimiter "-"
}
return $mySQLVersion
return "MySQL $mySQLVersion"
}
function Get-SQLCmdVersion {
$sqlcmdVersion = sqlcmd -? | Select-String -Pattern "Version" | Take-OutputPart -Part 1
return $sqlcmdVersion
return "sqlcmd $sqlcmdVersion"
}
function Get-SqlPackageVersion {
$sqlPackageVersion = sqlpackage /version
return $sqlPackageVersion
return "SqlPackage $sqlPackageVersion"
}
function Build-PostgreSqlSection {
$node = [HeaderNode]::new("PostgreSQL")
$node.AddToolVersion("PostgreSQL", $(Get-PostgreSqlVersion))
$node.AddNote(@(
"User: postgres",
"PostgreSQL service is disabled by default.",
"Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'"
) -join "`n")
$output = ""
return $node
$output += New-MDHeader "PostgreSQL" -Level 4
$output += New-MDList -Style Unordered -Lines @(
(Get-PostgreSqlVersion ),
"PostgreSQL Server (user:postgres)"
)
$output += New-MDCode -Lines @(
"PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'"
)
return $output
}
function Build-MySQLSection {
$node = [HeaderNode]::new("MySQL")
$node.AddToolVersion("MySQL", $(Get-MySQLVersion))
$node.AddNote(@(
"User: root",
"Password: root",
"MySQL service is disabled by default.",
"Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
) -join "`n")
$output = ""
return $node
$output += New-MDHeader "MySQL" -Level 4
$output += New-MDList -Style Unordered -Lines @(
(Get-MySQLVersion ),
"MySQL Server (user:root password:root)"
)
$output += New-MDCode -Lines @(
"MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
)
return $output
}
function Build-MSSQLToolsSection {
$node = [HeaderNode]::new("MS SQL")
$node.AddToolVersion("sqlcmd", $(Get-SQLCmdVersion))
$node.AddToolVersion("SqlPackage", $(Get-SqlPackageVersion))
return $node
$output = ""
$output += New-MDHeader "MS SQL Server Client Tools" -Level 4
$output += New-MDList -Style Unordered -Lines @(
(Get-SQLCmdVersion),
(Get-SqlPackageVersion)
)
return $output
}
@@ -1,6 +1,3 @@
using module ./software-report-base/SoftwareReport.psm1
using module ./software-report-base/SoftwareReport.Nodes.psm1
param (
[Parameter(Mandatory)][string]
$OutputDirectory
@@ -10,6 +7,7 @@ $global:ErrorActionPreference = "Stop"
$global:ErrorView = "NormalView"
Set-StrictMode -Version Latest
Import-Module MarkdownPS
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking
@@ -25,221 +23,303 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.WebServers.psm1") -Disabl
# Restore file owner in user profile
Restore-UserOwner
# Software report
$softwareReport = [SoftwareReport]::new("Ubuntu $(Get-OSVersionShort)")
$softwareReport.Root.AddToolVersion("OS Version:", $(Get-OSVersionFull))
$softwareReport.Root.AddToolVersion("Kernel Version:", $(Get-KernelVersion))
$softwareReport.Root.AddToolVersion("Image Version:", $env:IMAGE_VERSION)
$markdown = ""
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
$OSName = Get-OSName
$markdown += New-MDHeader "$OSName" -Level 1
# Language and Runtime
$languageAndRuntime = $installedSoftware.AddHeader("Language and Runtime")
$languageAndRuntime.AddToolVersion("Bash", $(Get-BashVersion))
$languageAndRuntime.AddToolVersionsListInline("Clang", $(Get-ClangToolVersions -ToolName "clang"), "^\d+")
$languageAndRuntime.AddToolVersionsListInline("Clang-format", $(Get-ClangToolVersions -ToolName "clang-format"), "^\d+")
$languageAndRuntime.AddToolVersionsListInline("Clang-tidy", $(Get-ClangTidyVersions), "^\d+")
$languageAndRuntime.AddToolVersion("Dash", $(Get-DashVersion))
if (Test-IsUbuntu20) {
$languageAndRuntime.AddToolVersion("Erlang", $(Get-ErlangVersion))
$languageAndRuntime.AddToolVersion("Erlang rebar3", $(Get-ErlangRebar3Version))
$kernelVersion = Get-KernelVersion
$markdown += New-MDList -Style Unordered -Lines @(
"$kernelVersion"
"Image Version: $env:IMAGE_VERSION"
)
$markdown += New-MDHeader "Installed Software" -Level 2
$markdown += New-MDHeader "Language and Runtime" -Level 3
$runtimesList = @(
(Get-BashVersion),
(Get-DashVersion),
(Get-CPPVersions),
(Get-FortranVersions),
(Get-MsbuildVersion),
(Get-MonoVersion),
(Get-NodeVersion),
(Get-PerlVersion),
(Get-PythonVersion),
(Get-Python3Version),
(Get-RubyVersion),
(Get-JuliaVersion),
(Get-ClangVersions),
(Get-ClangFormatVersions),
(Get-ClangTidyVersions),
(Get-KotlinVersion)
)
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$runtimesList += @(
(Get-ErlangVersion),
(Get-ErlangRebar3Version),
(Get-SwiftVersion)
)
}
$languageAndRuntime.AddToolVersionsListInline("GNU C++", $(Get-CPPVersions), "^\d+")
$languageAndRuntime.AddToolVersionsListInline("GNU Fortran", $(Get-FortranVersions), "^\d+")
$languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion))
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MsbuildVersion))
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
$languageAndRuntime.AddToolVersion("Swift", $(Get-SwiftVersion))
# Package Management
$packageManagement = $installedSoftware.AddHeader("Package Management")
$packageManagement.AddToolVersion("cpan", $(Get-CpanVersion))
$packageManagement.AddToolVersion("Helm", $(Get-HelmVersion))
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
$packageManagement.AddToolVersion("Miniconda", $(Get-MinicondaVersion))
$packageManagement.AddToolVersion("Npm", $(Get-NpmVersion))
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion))
$packageManagement.AddToolVersion("Pip3", $(Get-Pip3Version))
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
$packageManagement.AddToolVersion("RubyGems", $(Get-GemVersion))
$packageManagement.AddToolVersion("Vcpkg", $(Get-VcpkgVersion))
$packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion))
$packageManagement.AddHeader("Environment variables").AddTable($(Build-PackageManagementEnvironmentTable))
$packageManagement.AddHeader("Homebrew note").AddNote(@'
$markdown += New-MDList -Style Unordered -Lines ($runtimesList | Sort-Object)
$markdown += New-MDHeader "Package Management" -Level 3
$packageManagementList = @(
(Get-HomebrewVersion),
(Get-CpanVersion),
(Get-GemVersion),
(Get-MinicondaVersion),
(Get-NuGetVersion),
(Get-HelmVersion),
(Get-NpmVersion),
(Get-YarnVersion),
(Get-PipxVersion),
(Get-PipVersion),
(Get-Pip3Version),
(Get-VcpkgVersion)
)
$markdown += New-MDList -Style Unordered -Lines ($packageManagementList | Sort-Object)
$markdown += New-MDHeader "Notes:" -Level 5
$reportHomebrew = @'
```
Location: /home/linuxbrew
Note: Homebrew is pre-installed on image but not added to PATH.
run the eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" command
to accomplish this.
'@)
```
'@
$markdown += New-MDParagraph -Lines $reportHomebrew
# Project Management
$projectManagement = $installedSoftware.AddHeader("Project Management")
$markdown += New-MDHeader "Environment variables" -Level 4
$markdown += Build-PackageManagementEnvironmentTable | New-MDTable
$markdown += New-MDNewLine
$markdown += New-MDHeader "Project Management" -Level 3
$projectManagementList = @()
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$projectManagement.AddToolVersion("Ant", $(Get-AntVersion))
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
$projectManagementList += @(
(Get-AntVersion),
(Get-GradleVersion),
(Get-MavenVersion),
(Get-SbtVersion)
)
}
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
$projectManagement.AddToolVersion("Lerna", $(Get-LernaVersion))
$projectManagementList += @(
(Get-LernaVersion)
)
}
$markdown += New-MDList -Style Unordered -Lines ($projectManagementList | Sort-Object)
$markdown += New-MDHeader "Tools" -Level 3
$toolsList = @(
(Get-AnsibleVersion),
(Get-AptFastVersion),
(Get-AzCopyVersion),
(Get-BazelVersion),
(Get-BazeliskVersion),
(Get-BicepVersion),
(Get-CodeQLBundleVersion),
(Get-CMakeVersion),
(Get-DockerMobyClientVersion),
(Get-DockerMobyServerVersion),
(Get-DockerComposeV1Version),
(Get-DockerComposeV2Version),
(Get-DockerBuildxVersion),
(Get-DockerAmazonECRCredHelperVersion),
(Get-BuildahVersion),
(Get-PodManVersion),
(Get-SkopeoVersion),
(Get-GitVersion),
(Get-GitLFSVersion),
(Get-GitFTPVersion),
(Get-HavegedVersion),
(Get-HerokuVersion),
(Get-LeiningenVersion),
(Get-SVNVersion),
(Get-JqVersion),
(Get-YqVersion),
(Get-KindVersion),
(Get-KubectlVersion),
(Get-KustomizeVersion),
(Get-MediainfoVersion),
(Get-HGVersion),
(Get-MinikubeVersion),
(Get-NewmanVersion),
(Get-NVersion),
(Get-NvmVersion),
(Get-OpensslVersion),
(Get-PackerVersion),
(Get-ParcelVersion),
(Get-PulumiVersion),
(Get-RVersion),
(Get-SphinxVersion),
(Get-TerraformVersion),
(Get-YamllintVersion),
(Get-ZstdVersion)
)
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$projectManagement.AddToolVersion("Maven", $(Get-MavenVersion))
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
$toolsList += @(
(Get-PhantomJSVersion),
(Get-HHVMVersion)
)
}
# Tools
$tools = $installedSoftware.AddHeader("Tools")
$tools.AddToolVersion("Ansible", $(Get-AnsibleVersion))
$tools.AddToolVersion("apt-fast", $(Get-AptFastVersion))
$tools.AddToolVersion("AzCopy", $(Get-AzCopyVersion))
$tools.AddToolVersion("Bazel", $(Get-BazelVersion))
$tools.AddToolVersion("Bazelisk", $(Get-BazeliskVersion))
$tools.AddToolVersion("Bicep", $(Get-BicepVersion))
$tools.AddToolVersion("Buildah", $(Get-BuildahVersion))
$tools.AddToolVersion("CMake", $(Get-CMakeVersion))
$tools.AddToolVersion("CodeQL Action Bundles", $(Get-CodeQLBundleVersions))
$tools.AddToolVersion("Docker Amazon ECR Credential Helper", $(Get-DockerAmazonECRCredHelperVersion))
$tools.AddToolVersion("Docker Compose v1", $(Get-DockerComposeV1Version))
$tools.AddToolVersion("Docker Compose v2", $(Get-DockerComposeV2Version))
$tools.AddToolVersion("Docker-Buildx", $(Get-DockerBuildxVersion))
$tools.AddToolVersion("Docker-Moby Client", $(Get-DockerMobyClientVersion))
$tools.AddToolVersion("Docker-Moby Server", $(Get-DockerMobyServerVersion))
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
$toolsList += (Get-FastlaneVersion)
}
$tools.AddToolVersion("Git", $(Get-GitVersion))
$tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
$tools.AddToolVersion("Git-ftp", $(Get-GitFTPVersion))
$tools.AddToolVersion("Haveged", $(Get-HavegedVersion))
$tools.AddToolVersion("Heroku", $(Get-HerokuVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$tools.AddToolVersion("HHVM (HipHop VM)", $(Get-HHVMVersion))
}
$tools.AddToolVersion("jq", $(Get-JqVersion))
$tools.AddToolVersion("Kind", $(Get-KindVersion))
$tools.AddToolVersion("Kubectl", $(Get-KubectlVersion))
$tools.AddToolVersion("Kustomize", $(Get-KustomizeVersion))
$tools.AddToolVersion("Leiningen", $(Get-LeiningenVersion))
$tools.AddToolVersion("MediaInfo", $(Get-MediainfoVersion))
$tools.AddToolVersion("Mercurial", $(Get-HGVersion))
$tools.AddToolVersion("Minikube", $(Get-MinikubeVersion))
$tools.AddToolVersion("n", $(Get-NVersion))
$tools.AddToolVersion("Newman", $(Get-NewmanVersion))
$tools.AddToolVersion("nvm", $(Get-NvmVersion))
$tools.AddToolVersion("OpenSSL", $(Get-OpensslVersion))
$tools.AddToolVersion("Packer", $(Get-PackerVersion))
$tools.AddToolVersion("Parcel", $(Get-ParcelVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$tools.AddToolVersion("PhantomJS", $(Get-PhantomJSVersion))
}
$tools.AddToolVersion("Podman", $(Get-PodManVersion))
$tools.AddToolVersion("Pulumi", $(Get-PulumiVersion))
$tools.AddToolVersion("R", $(Get-RVersion))
$tools.AddToolVersion("Skopeo", $(Get-SkopeoVersion))
$tools.AddToolVersion("Sphinx Open Source Search Server", $(Get-SphinxVersion))
$tools.AddToolVersion("SVN", $(Get-SVNVersion))
$tools.AddToolVersion("Terraform", $(Get-TerraformVersion))
$tools.AddToolVersion("yamllint", $(Get-YamllintVersion))
$tools.AddToolVersion("yq", $(Get-YqVersion))
$tools.AddToolVersion("zstd", $(Get-ZstdVersion))
# CLI Tools
$cliTools = $installedSoftware.AddHeader("CLI Tools")
$cliTools.AddToolVersion("Alibaba Cloud CLI", $(Get-AlibabaCloudCliVersion))
$cliTools.AddToolVersion("AWS CLI", $(Get-AWSCliVersion))
$cliTools.AddToolVersion("AWS CLI Session Manager Plugin", $(Get-AWSCliSessionManagerPluginVersion))
$cliTools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMVersion))
$cliTools.AddToolVersion("Azure CLI", $(Get-AzureCliVersion))
$cliTools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
$cliTools.AddToolVersion("GitHub CLI", $(Get-GitHubCliVersion))
$cliTools.AddToolVersion("Google Cloud SDK", $(Get-GoogleCloudSDKVersion))
$cliTools.AddToolVersion("Hub CLI", $(Get-HubCliVersion))
$cliTools.AddToolVersion("Netlify CLI", $(Get-NetlifyCliVersion))
$cliTools.AddToolVersion("OpenShift CLI", $(Get-OCCliVersion))
$cliTools.AddToolVersion("ORAS CLI", $(Get-ORASCliVersion))
$cliTools.AddToolVersion("Vercel CLI", $(Get-VerselCliversion))
$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object)
$markdown += New-MDHeader "CLI Tools" -Level 3
$markdown += New-MDList -Style Unordered -Lines (@(
(Get-AlibabaCloudCliVersion),
(Get-AWSCliVersion),
(Get-AWSCliSessionManagerPluginVersion),
(Get-AWSSAMVersion),
(Get-AzureCliVersion),
(Get-AzureDevopsVersion),
(Get-GitHubCliVersion),
(Get-GoogleCloudSDKVersion),
(Get-HubCliVersion),
(Get-NetlifyCliVersion),
(Get-OCCliVersion),
(Get-ORASCliVersion),
(Get-VerselCliversion)
) | Sort-Object
)
$markdown += New-MDHeader "Java" -Level 3
$markdown += Get-JavaVersions | New-MDTable
$markdown += New-MDNewLine
$installedSoftware.AddHeader("Java").AddTable($(Get-JavaVersionsTable))
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
$installedSoftware.AddHeader("GraalVM").AddTable($(Build-GraalVMTable))
$markdown += New-MDHeader "GraalVM" -Level 3
$markdown += Build-GraalVMTable | New-MDTable
$markdown += New-MDNewLine
}
$phpTools = $installedSoftware.AddHeader("PHP Tools")
$phpTools.AddToolVersionsListInline("PHP", $(Get-PHPVersions), "^\d+\.\d+")
$phpTools.AddToolVersion("Composer", $(Get-ComposerVersion))
$phpTools.AddToolVersion("PHPUnit", $(Get-PHPUnitVersion))
$phpTools.AddNote("Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.")
$markdown += Build-PHPSection
$haskellTools = $installedSoftware.AddHeader("Haskell Tools")
$haskellTools.AddToolVersion("Cabal", $(Get-CabalVersion))
$haskellTools.AddToolVersion("GHC", $(Get-GHCVersion))
$haskellTools.AddToolVersion("GHCup", $(Get-GHCupVersion))
$haskellTools.AddToolVersion("Stack", $(Get-StackVersion))
$markdown += New-MDHeader "Haskell" -Level 3
$markdown += New-MDList -Style Unordered -Lines (@(
(Get-GHCVersion),
(Get-GHCupVersion),
(Get-CabalVersion),
(Get-StackVersion)
) | Sort-Object
)
Initialize-RustEnvironment
$rustTools = $installedSoftware.AddHeader("Rust Tools")
$rustTools.AddToolVersion("Cargo", $(Get-CargoVersion))
$rustTools.AddToolVersion("Rust", $(Get-RustVersion))
$rustTools.AddToolVersion("Rustdoc", $(Get-RustdocVersion))
$rustTools.AddToolVersion("Rustup", $(Get-RustupVersion))
$rustToolsPackages = $rustTools.AddHeader("Packages")
$rustToolsPackages.AddToolVersion("Bindgen", $(Get-BindgenVersion))
$rustToolsPackages.AddToolVersion("Cargo audit", $(Get-CargoAuditVersion))
$rustToolsPackages.AddToolVersion("Cargo clippy", $(Get-CargoClippyVersion))
$rustToolsPackages.AddToolVersion("Cargo outdated", $(Get-CargoOutdatedVersion))
$rustToolsPackages.AddToolVersion("Cbindgen", $(Get-CbindgenVersion))
$rustToolsPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
$markdown += New-MDHeader "Rust Tools" -Level 3
$markdown += New-MDList -Style Unordered -Lines (@(
(Get-RustVersion),
(Get-RustupVersion),
(Get-RustdocVersion),
(Get-CargoVersion)
) | Sort-Object
)
$browsersTools = $installedSoftware.AddHeader("Browsers and Drivers")
$browsersTools.AddToolVersion("Google Chrome", $(Get-ChromeVersion))
$browsersTools.AddToolVersion("ChromeDriver", $(Get-ChromeDriverVersion))
$browsersTools.AddToolVersion("Chromium", $(Get-ChromiumVersion))
$browsersTools.AddToolVersion("Microsoft Edge", $(Get-EdgeVersion))
$browsersTools.AddToolVersion("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
$browsersTools.AddToolVersion("Selenium server", $(Get-SeleniumVersion))
$browsersTools.AddToolVersion("Mozilla Firefox", $(Get-FirefoxVersion))
$browsersTools.AddToolVersion("Geckodriver", $(Get-GeckodriverVersion))
$browsersTools.AddHeader("Environment variables").AddTable($(Build-BrowserWebdriversEnvironmentTable))
$markdown += New-MDHeader "Packages" -Level 4
$markdown += New-MDList -Style Unordered -Lines (@(
(Get-BindgenVersion),
(Get-CargoAuditVersion),
(Get-CargoOutdatedVersion),
(Get-CargoClippyVersion),
(Get-CbindgenVersion),
(Get-RustfmtVersion)
) | Sort-Object
)
$netCoreTools = $installedSoftware.AddHeader(".NET Tools")
$netCoreTools.AddToolVersionsListInline(".NET Core SDK", $(Get-DotNetCoreSdkVersions), "^\d+\.\d+\.\d")
$netCoreTools.AddNodes($(Get-DotnetTools))
$markdown += New-MDHeader "Browsers and Drivers" -Level 3
$browsersAndDriversList = @(
(Get-ChromeVersion),
(Get-ChromeDriverVersion),
(Get-ChromiumVersion),
(Get-EdgeVersion),
(Get-EdgeDriverVersion),
(Get-SeleniumVersion)
)
$databasesTools = $installedSoftware.AddHeader("Databases")
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$databasesTools.AddToolVersion("MongoDB", $(Get-MongoDbVersion))
$browsersAndDriversList += @(
(Get-FirefoxVersion),
(Get-GeckodriverVersion)
)
}
$databasesTools.AddToolVersion("sqlite3", $(Get-SqliteVersion))
$databasesTools.AddNode($(Build-PostgreSqlSection))
$databasesTools.AddNode($(Build-MySQLSection))
$databasesTools.AddNode($(Build-MSSQLToolsSection))
$cachedTools = $installedSoftware.AddHeader("Cached Tools")
$cachedTools.AddToolVersionsList("Go", $(Get-ToolcacheGoVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("Node.js", $(Get-ToolcacheNodeVersions), "^\d+")
$cachedTools.AddToolVersionsList("Python", $(Get-ToolcachePythonVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("PyPy", $(Get-ToolcachePyPyVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("Ruby", $(Get-ToolcacheRubyVersions), "^\d+\.\d+")
$markdown += New-MDList -Style Unordered -Lines $browsersAndDriversList
$markdown += New-MDHeader "Environment variables" -Level 4
$markdown += Build-BrowserWebdriversEnvironmentTable | New-MDTable
$markdown += New-MDNewLine
$powerShellTools = $installedSoftware.AddHeader("PowerShell Tools")
$powerShellTools.AddToolVersion("PowerShell", $(Get-PowershellVersion))
$powerShellTools.AddHeader("PowerShell Modules").AddNodes($(Get-PowerShellModules))
$markdown += New-MDHeader ".NET Core SDK" -Level 3
$markdown += New-MDList -Style Unordered -Lines @(
(Get-DotNetCoreSdkVersions)
)
$installedSoftware.AddHeader("Web Servers").AddTable($(Build-WebServersTable))
$markdown += New-MDHeader ".NET tools" -Level 3
$tools = Get-DotnetTools
$markdown += New-MDList -Lines $tools -Style Unordered
$androidTools = $installedSoftware.AddHeader("Android")
$androidTools.AddTable($(Build-AndroidTable))
$androidTools.AddHeader("Environment variables").AddTable($(Build-AndroidEnvironmentTable))
$markdown += New-MDHeader "Databases" -Level 3
$databaseLists = @(
(Get-SqliteVersion)
)
$installedSoftware.AddHeader("Cached Docker images").AddTable($(Get-CachedDockerImagesTableData))
$installedSoftware.AddHeader("Installed apt packages").AddTable($(Get-AptPackages))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$databaseLists += @(
(Get-MongoDbVersion)
)
}
$softwareReport.ToJson() | Out-File -FilePath "${OutputDirectory}/software-report.json" -Encoding UTF8NoBOM
$softwareReport.ToMarkdown() | Out-File -FilePath "${OutputDirectory}/software-report.md" -Encoding UTF8NoBOM
$markdown += New-MDList -Style Unordered -Lines ( $databaseLists | Sort-Object )
$markdown += Build-PostgreSqlSection
$markdown += Build-MySQLSection
$markdown += Build-MSSQLToolsSection
$markdown += New-MDHeader "Cached Tools" -Level 3
$markdown += Build-CachedToolsSection
$markdown += New-MDHeader "Environment variables" -Level 4
$markdown += Build-GoEnvironmentTable | New-MDTable
$markdown += New-MDNewLine
$markdown += New-MDHeader "PowerShell Tools" -Level 3
$markdown += New-MDList -Lines (Get-PowershellVersion) -Style Unordered
$markdown += New-MDHeader "PowerShell Modules" -Level 4
$markdown += Get-PowerShellModules | New-MDTable
$markdown += New-MDNewLine
$markdown += New-MDHeader "Az PowerShell Modules" -Level 4
$markdown += New-MDList -Style Unordered -Lines @(
(Get-AzModuleVersions)
)
$markdown += Build-WebServersSection
$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
$markdown += New-MDHeader "Cached Docker images" -Level 3
$markdown += Get-CachedDockerImagesTableData | New-MDTable
$markdown += New-MDNewLine
$markdown += New-MDHeader "Installed apt packages" -Level 3
$markdown += Get-AptPackages | New-MDTable
Test-BlankElement
$markdown | Out-File -FilePath "${OutputDirectory}/Ubuntu-Readme.md"
@@ -1,4 +1,4 @@
function Get-JavaVersionsTable {
function Get-JavaVersions {
$javaToolcacheVersions = Get-ChildItem $env:AGENT_TOOLSDIRECTORY/Java*/* -Directory | Sort-Object { [int]$_.Name.Split(".")[0] }
$existingVersions = $javaToolcacheVersions | ForEach-Object {
@@ -5,51 +5,52 @@ function Initialize-RustEnvironment {
}
function Get-RustVersion {
Initialize-RustEnvironment
$rustVersion = $(rustc --version) | Take-OutputPart -Part 1
return $rustVersion
return "Rust $rustVersion"
}
function Get-BindgenVersion {
$bindgenVersion = $(bindgen --version) | Take-OutputPart -Part 1
return $bindgenVersion
return "Bindgen $bindgenVersion"
}
function Get-CargoVersion {
$cargoVersion = $(cargo --version) | Take-OutputPart -Part 1
return $cargoVersion
return "Cargo $cargoVersion"
}
function Get-CargoAuditVersion {
$cargoAuditVersion = $(cargo-audit --version) | Take-OutputPart -Part 1
return $cargoAuditVersion
return "Cargo audit $cargoAuditVersion"
}
function Get-CargoOutdatedVersion {
$cargoOutdatedVersion = cargo outdated --version | Take-OutputPart -Part 1
return $cargoOutdatedVersion
return "Cargo outdated $cargoOutdatedVersion"
}
function Get-CargoClippyVersion {
$cargoClippyVersion = $(cargo-clippy --version) | Take-OutputPart -Part 1
return $cargoClippyVersion
return "Cargo clippy $cargoClippyVersion"
}
function Get-CbindgenVersion {
$cbindgenVersion = $(cbindgen --version) | Take-OutputPart -Part 1
return $cbindgenVersion
return "Cbindgen $cbindgenVersion"
}
function Get-RustupVersion {
$rustupVersion = $(rustup --version) | Take-OutputPart -Part 1
return $rustupVersion
return "Rustup $rustupVersion"
}
function Get-RustdocVersion {
$rustdocVersion = $(rustdoc --version) | Take-OutputPart -Part 1
return $rustdocVersion
return "Rustdoc $rustdocVersion"
}
function Get-RustfmtVersion {
$rustfmtVersion = $(rustfmt --version) | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-"
return $rustfmtVersion
return "Rustfmt $rustfmtVersion"
}
@@ -1,295 +1,308 @@
function Get-AnsibleVersion {
$ansibleVersion = (ansible --version)[0] -replace "[^\d.]"
return $ansibleVersion
return "Ansible $ansibleVersion"
}
function Get-AptFastVersion {
$versionFileContent = Get-Content (which apt-fast) -Raw
$match = [Regex]::Match($versionFileContent, '# apt-fast v(.+)\n')
return $match.Groups[1].Value
$aptFastVersion = $match.Groups[1].Value
return "apt-fast $aptFastVersion"
}
function Get-AzCopyVersion {
$azcopyVersion = azcopy --version | Take-OutputPart -Part 2
return "$azcopyVersion - available by ``azcopy`` and ``azcopy10`` aliases"
return "AzCopy $azcopyVersion (available by ``azcopy`` and ``azcopy10`` aliases)"
}
function Get-BazelVersion {
$bazelVersion = bazel --version | Select-String "bazel" | Take-OutputPart -Part 1
return $bazelVersion
return "Bazel $bazelVersion"
}
function Get-BazeliskVersion {
$result = Get-CommandResult "bazelisk version" -Multiline
$bazeliskVersion = $result.Output | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v"
return $bazeliskVersion
return "Bazelisk $bazeliskVersion"
}
function Get-BicepVersion {
(bicep --version | Out-String) -match "bicep cli version (?<version>\d+\.\d+\.\d+)" | Out-Null
return $Matches.Version
$bicepVersion = $Matches.Version
return "Bicep $bicepVersion"
}
function Get-CodeQLBundleVersions {
function Get-CodeQLBundleVersion {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$CodeQLVersionPaths = Get-ChildItem $CodeQLVersionsWildcard
$CodeQlVersions=@()
foreach ($CodeQLVersionPath in $CodeQLVersionPaths) {
$FullCodeQLVersionPath = $CodeQLVersionPath | Select-Object -Expand FullName
$CodeQLPath = Join-Path $FullCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
$CodeQLVersion = & $CodeQLPath version --quiet
$CodeQLVersions += $CodeQLVersion
}
return $CodeQLVersions
$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 {
$podmanVersion = podman --version | Take-OutputPart -Part 2
return $podmanVersion
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
return "Podman $podmanVersion (apt source repository: $aptSourceRepo)"
}
return "Podman $podmanVersion"
}
function Get-BuildahVersion {
$buildahVersion = buildah --version | Take-OutputPart -Part 2
return $buildahVersion
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
return "Buildah $buildahVersion (apt source repository: $aptSourceRepo)"
}
return "Buildah $buildahVersion"
}
function Get-SkopeoVersion {
$skopeoVersion = skopeo --version | Take-OutputPart -Part 2
return $skopeoVersion
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
return "Skopeo $skopeoVersion (apt source repository: $aptSourceRepo)"
}
return "Skopeo $skopeoVersion"
}
function Get-CMakeVersion {
$cmakeVersion = cmake --version | Select-Object -First 1 | Take-OutputPart -Part 2
return $cmakeVersion
return "CMake $cmakeVersion"
}
function Get-DockerComposeV1Version {
$composeVersion = docker-compose -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter ","
return $composeVersion
return "Docker Compose v1 $composeVersion"
}
function Get-DockerComposeV2Version {
$composeVersion = docker compose version | Take-OutputPart -Part 3
return $composeVersion
return "Docker Compose v2 $composeVersion"
}
function Get-DockerMobyClientVersion {
$dockerClientVersion = sudo docker version --format '{{.Client.Version}}'
return $dockerClientVersion
return "Docker-Moby Client $dockerClientVersion"
}
function Get-DockerMobyServerVersion {
$dockerServerVersion = sudo docker version --format '{{.Server.Version}}'
return $dockerServerVersion
return "Docker-Moby Server $dockerServerVersion"
}
function Get-DockerBuildxVersion {
$buildxVersion = docker buildx version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "+"
return $buildxVersion
return "Docker-Buildx $buildxVersion"
}
function Get-DockerAmazonECRCredHelperVersion {
$ecrVersion = docker-credential-ecr-login -v | Select-String "Version:" | Take-OutputPart -Part 1
return $ecrVersion
return "Docker Amazon ECR Credential Helper $ecrVersion"
}
function Get-GitVersion {
$gitVersion = git --version | Take-OutputPart -Part -1
return $gitVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-core"
return "Git $gitVersion (apt source repository: $aptSourceRepo)"
}
function Get-GitLFSVersion {
$result = Get-CommandResult "git-lfs --version"
$gitlfsversion = $result.Output | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
return $gitlfsversion
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-lfs"
return "Git LFS $gitlfsversion (apt source repository: $aptSourceRepo)"
}
function Get-GitFTPVersion {
$gitftpVersion = git-ftp --version | Take-OutputPart -Part 2
return $gitftpVersion
return "Git-ftp $gitftpVersion"
}
function Get-GoogleCloudSDKVersion {
return (gcloud --version | Select-Object -First 1) | Take-OutputPart -Part 3
$aptSourceRepo = Get-AptSourceRepository -PackageName "google-cloud-sdk"
return "$(gcloud --version | Select-Object -First 1) (apt source repository: $aptSourceRepo)"
}
function Get-HavegedVersion {
$havegedVersion = dpkg-query --showformat='${Version}' --show haveged | Take-OutputPart -Part 0 -Delimiter "-"
return $havegedVersion
return "Haveged $havegedVersion"
}
function Get-HerokuVersion {
$herokuVersion = heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
return $herokuVersion
return "Heroku $herokuVersion"
}
function Get-HHVMVersion {
$hhvmVersion = hhvm --version | Select-Object -First 1 | Take-OutputPart -Part 2
return $hhvmVersion
return "HHVM (HipHop VM) $hhvmVersion"
}
function Get-SVNVersion {
$svnVersion = svn --version | Select-Object -First 1 | Take-OutputPart -Part 2
return $svnVersion
return "SVN $svnVersion"
}
function Get-KustomizeVersion {
$kustomizeVersion = kustomize version --short | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "v"
return $kustomizeVersion
return "Kustomize $kustomizeVersion"
}
function Get-KindVersion {
$kindVersion = kind version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "v"
return $kindVersion
return "Kind $kindVersion"
}
function Get-KubectlVersion {
$kubectlVersion = (kubectl version --client --output=json | ConvertFrom-Json).clientVersion.gitVersion.Replace('v','')
return $kubectlVersion
return "Kubectl $kubectlVersion"
}
function Get-MinikubeVersion {
$minikubeVersion = minikube version --short | Take-OutputPart -Part 0 -Delimiter "v"
return $minikubeVersion
return "Minikube $minikubeVersion"
}
function Get-HGVersion {
$hgVersion = hg --version | Select-Object -First 1 | Take-OutputPart -Part -1 | Take-OutputPart -Part 0 -Delimiter ")"
return $hgVersion
return "Mercurial $hgVersion"
}
function Get-LeiningenVersion {
return "$(lein -v | Take-OutputPart -Part 1)"
return "$(lein -v | Take-OutputPart -Part 0,1)"
}
function Get-MediainfoVersion {
$mediainfoVersion = (mediainfo --version | Select-Object -Index 1 | Take-OutputPart -Part 2).Replace('v', '')
return $mediainfoVersion
return "MediaInfo $mediainfoVersion"
}
function Get-NewmanVersion {
return $(newman --version)
return "Newman $(newman --version)"
}
function Get-NVersion {
$nVersion = (n --version).Replace('v', '')
return $nVersion
return "n $nVersion"
}
function Get-NvmVersion {
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
return $nvmVersion
return "nvm $nvmVersion"
}
function Get-PackerVersion {
# Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855
$result = (Get-CommandResult "packer --version").Output
$packerVersion = [regex]::matches($result, "(\d+.){2}\d+").Value
return $packerVersion
return "Packer $packerVersion"
}
function Get-PhantomJSVersion {
return $(phantomjs --version)
return "PhantomJS $(phantomjs --version)"
}
function Get-TerraformVersion {
return (terraform version | Select-String "^Terraform").Line.Replace('v','') | Take-OutputPart -Part 1
return (terraform version | Select-String "^Terraform").Line.Replace('v','')
}
function Get-JqVersion {
$jqVersion = jq --version | Take-OutputPart -Part 1 -Delimiter "-"
return $jqVersion
return "jq $jqVersion"
}
function Get-AzureCliVersion {
$azcliVersion = (az version | ConvertFrom-Json).'azure-cli'
return $azcliVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "azure-cli"
return "Azure CLI (azure-cli) $azcliVersion (installation method: $aptSourceRepo)"
}
function Get-AzureDevopsVersion {
$azdevopsVersion = (az version | ConvertFrom-Json).extensions.'azure-devops'
return $azdevopsVersion
return "Azure CLI (azure-devops) $azdevopsVersion"
}
function Get-AlibabaCloudCliVersion {
return $(aliyun version)
return "Alibaba Cloud CLI $(aliyun version)"
}
function Get-AWSCliVersion {
$result = Get-CommandResult "aws --version"
$awsVersion = $result.Output | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
return $awsVersion
return "AWS CLI $awsVersion"
}
function Get-AWSCliSessionManagerPluginVersion {
$result = (Get-CommandResult "session-manager-plugin --version").Output
return $result
return "AWS CLI Session manager plugin $result"
}
function Get-AWSSAMVersion {
return $(sam --version | Take-OutputPart -Part -1)
return "AWS SAM CLI $(sam --version | Take-OutputPart -Part -1)"
}
function Get-FastlaneVersion {
$fastlaneVersion = fastlane --version | Select-String "^fastlane [0-9]" | Take-OutputPart -Part 1
return $fastlaneVersion
return "Fastlane $fastlaneVersion"
}
function Get-HubCliVersion {
$hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2
return $hubVersion
return "Hub CLI $hubVersion"
}
function Get-GitHubCliVersion {
$ghVersion = gh --version | Select-String "gh version" | Take-OutputPart -Part 2
return $ghVersion
return "GitHub CLI $ghVersion"
}
function Get-NetlifyCliVersion {
$netlifyVersion = netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
return $netlifyVersion
return "Netlify CLI $netlifyVersion"
}
function Get-OCCliVersion {
$ocVersion = oc version -o=json | jq -r '.releaseClientVersion'
return $ocVersion
return "OpenShift CLI $ocVersion"
}
function Get-ORASCliVersion {
$orasVersion = oras version | Select-String "^Version:" | Take-OutputPart -Part 1
return $orasVersion
return "ORAS CLI $orasVersion"
}
function Get-VerselCliversion {
$result = Get-CommandResult "vercel --version" -Multiline
return $result.Output | Select-Object -Skip 1 -First 1
return $result.Output | Select-Object -First 1
}
function Get-PulumiVersion {
$pulumiVersion = pulumi version | Take-OutputPart -Part 0 -Delimiter "v"
return $pulumiVersion
return "Pulumi $pulumiVersion"
}
function Get-RVersion {
$rVersion = (Get-CommandResult "R --version | grep 'R version'").Output | Take-OutputPart -Part 2
return $rVersion
return "R $rVersion"
}
function Get-SphinxVersion {
$sphinxVersion = searchd -h | Select-Object -First 1 | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-"
return $sphinxVersion
return "Sphinx Open Source Search Server $sphinxVersion"
}
function Get-YamllintVersion {
return $(yamllint --version) | Take-OutputPart -Part 1
return "$(yamllint --version)"
}
function Get-ZstdVersion {
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
return "$zstdVersion"
return "zstd $zstdVersion (homebrew)"
}
function Get-YqVersion {
$yqVersion = $(yq -V) | Take-OutputPart -Part 3
return $yqVersion.TrimStart("v").Trim()
$yqVersion = ($(yq -V) -Split " ")[-1]
return "yq $yqVersion"
}
@@ -43,13 +43,19 @@ function Get-Xsp4Version {
}
}
function Build-WebServersTable {
$servers = @()
$servers += (Get-ApacheVersion)
function Build-WebServersSection {
$servers = @(
(Get-ApacheVersion),
(Get-NginxVersion)
)
if (Test-IsUbuntu20) {
$servers += (Get-Xsp4Version)
}
$servers += (Get-NginxVersion)
return $servers
$output = ""
$output += New-MDHeader "Web Servers" -Level 3
$output += $servers | Sort-Object Name | New-MDTable
$output += New-MDNewLine
return $output
}
@@ -29,17 +29,13 @@ function Get-CommandResult {
}
}
function Get-OSVersionShort {
$(Get-OSVersionFull) | Take-OutputPart -Delimiter '.' -Part 0,1
}
function Get-OSVersionFull {
lsb_release -ds | Take-OutputPart -Part 1, 2
function Get-OSName {
lsb_release -ds
}
function Get-KernelVersion {
$kernelVersion = uname -r
return $kernelVersion
return "Linux kernel version: $kernelVersion"
}
function Test-IsUbuntu18 {
@@ -10,6 +10,14 @@ function Take-OutputPart {
return [string]::Join($Delimiter, $selectedParts)
}
function New-MDNewLine {
param (
[int] $Count = 1
)
$newLineSymbol = [System.Environment]::NewLine
return $newLineSymbol * $Count
}
function Restore-UserOwner {
sudo chown -R ${env:USER}: $env:HOME
}
@@ -33,9 +41,118 @@ function Get-PathWithLink {
return "${inputPath}${link}"
}
function Get-CachedToolInstances
{
<#
.SYNOPSIS
Returns hastable of installed cached tools.
.DESCRIPTION
Return hastable that contains versions and architectures for selected cached tool.
.PARAMETER Name
Name of cached tool.
.PARAMETER VersionCommand
Optional parameter. Command to return version of system default tool.
.EXAMPLE
Get-CachedToolInstances -Name "Python" -VersionCommand "--version"
#>
param
(
[String] $Name,
[String] $VersionCommand
)
$toolInstances = @()
$toolPath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $Name
# Get all installed versions from TOOLSDIRECTORY folder
$versions = Get-ChildItem $toolPath | Sort-Object { [System.Version]$_.Name }
foreach ($version in $versions)
{
$instanceInfo = @{}
# Create instance hashtable
[string]$instanceInfo.Path = Join-Path -Path $toolPath -ChildPath $version.Name
[string]$instanceInfo.Version = $version.Name
# Get all architectures for current version
[array]$instanceInfo.Architecture_Array = Get-ChildItem $version.FullName -Name -Directory | Where-Object { $_ -match "^x[0-9]{2}$" }
[string]$instanceInfo.Architecture = $instanceInfo.Architecture_Array -Join ", "
# Add (default) postfix to version name, in case if current version is in environment path
if (-not ([string]::IsNullOrEmpty($VersionCommand)))
{
$defaultVersion = $(& ($Name.ToLower()) $VersionCommand 2>&1)
$defaultToolVersion = $defaultVersion | Select-String -Pattern "\d+\.\d+\.\d+" -AllMatches `
| ForEach-Object { $_.Matches.Value }
if ([version]$version.Name -eq [version]$defaultToolVersion)
{
$instanceInfo.Version += " (Default)"
}
}
$toolInstances += $instanceInfo
}
return $toolInstances
}
function Get-AptSourceRepository {
param([String] $PackageName)
$sourceUrl = Get-Content "$PSScriptRoot/../helpers/apt-sources.txt" | Select-String -Pattern $PackageName | Take-OutputPart -Part (1..3)
return $sourceUrl
}
function Test-BlankElement {
param(
[string] $Markdown
)
$splitByLines = $Markdown.Split("`n")
# Validate entry without version
$blankVersions = $splitByLines -match "^-" -notmatch "Image Version|MySQL Server|Vcpkg|\d\." | Out-String
# Validate tables with blank rows
$blankRows = ""
for($i = 0; $i -lt $splitByLines.Length; $i++) {
$addRows= $false
$table = @()
if ($splitByLines[$i].StartsWith("#") -and $splitByLines[$i+1].StartsWith("|")) {
$table += $splitByLines[$i,($i+1),($i+2)]
$i += 3
$current = $splitByLines[$i]
while ($current.StartsWith("|")) {
$isBlankRow = $current.Substring(1, $current.LastIndexOf("|") - 2).Split("|").Trim() -contains ""
if ($isBlankRow) {
$table += $current
$addRows = $true
}
$current = $splitByLines[++$i]
}
if ($addRows) {
$blankRows += $table | Out-String
}
}
}
# Display report
$isReport = $false
if ($blankVersions) {
Write-Host "Software list with blank version:`n${blankVersions}"
$isReport = $true
}
if ($blankRows) {
Write-Host "Tables with blank rows:`n${blankRows}"
$isReport = $true
}
if ($isReport) {
exit 1
}
}
@@ -20,10 +20,10 @@ function Invoke-PesterTests {
if (!(Get-Module "Pester")) {
Import-Module Pester
}
$configuration = [PesterConfiguration] @{
Run = @{ Path = $testPath; PassThru = $true }
Output = @{ Verbosity = "Detailed"; RenderMode = "Plaintext" }
Output = @{ Verbosity = "Detailed" }
}
if ($TestName) {
$configuration.Filter.FullName = $TestName
+18 -25
View File
@@ -43,33 +43,26 @@ echo "ANDROID_HOME=${ANDROID_SDK_ROOT}" | tee -a /etc/environment
# Create android sdk directory
mkdir -p ${ANDROID_SDK_ROOT}
# Download the latest command line tools so that we can accept all of the licenses.
# See https://developer.android.com/studio/#command-tools
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
if [[ $cmdlineToolsVersion == "latest" ]]; then
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
cmdlineToolsVersion=$(
yq -p=xml \
'.sdk-repository.remotePackage[] | select(."+path" == "cmdline-tools;latest").archives.archive[].complete.url | select(contains("commandlinetools-linux"))' \
/tmp/repository2-1.xml
)
if [[ -z $cmdlineToolsVersion ]]; then
echo "Failed to parse latest command-line tools version"
exit 1
fi
fi
cmdlineTools="android-cmdline-tools.zip"
if isUbuntu18; then
# Newer command-line-tools require Java 11 which is not default on ubuntu-18.04
download_with_retries "https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip" "." $cmdlineTools
else
# Download the latest command line tools so that we can accept all of the licenses.
# See https://developer.android.com/studio/#command-tools
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
if [[ $cmdlineToolsVersion == "latest" ]]; then
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
cmdlineToolsVersion=$(
yq -p=xml \
'.sdk-repository.remotePackage[] | select(."+@path" == "cmdline-tools;latest").archives.archive[].complete.url | select(contains("commandlinetools-linux"))' \
/tmp/repository2-1.xml
)
if [[ -z $cmdlineToolsVersion ]]; then
echo "Failed to parse latest command-line tools version"
exit 1
fi
fi
download_with_retries "https://dl.google.com/android/repository/${cmdlineToolsVersion}" "." $cmdlineTools
fi
unzip -qq $cmdlineTools -d ${ANDROID_SDK_ROOT}/cmdline-tools
# Command line tools need to be placed in ${ANDROID_SDK_ROOT}/sdk/cmdline-tools/latest to determine SDK root
mv ${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools ${ANDROID_SDK_ROOT}/cmdline-tools/latest
@@ -7,39 +7,19 @@
source $HELPER_SCRIPTS/install.sh
# Retrieve the name of the CodeQL bundle preferred by the Action (in the format codeql-bundle-YYYYMMDD).
base_url="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)"
codeql_tag_name="$(echo "$base_url" | jq -r '.bundleVersion')"
codeql_cli_version="$(echo "$base_url" | jq -r '.cliVersion')"
prior_codeql_tag_name="$(echo "$base_url" | jq -r '.priorBundleVersion')"
prior_codeql_cli_version="$(echo "$base_url" | jq -r '.priorCliVersion')"
codeql_bundle_name="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/v2/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##*-}"
# Convert the tag names to bundles with a version number (x.y.z-YYYYMMDD).
codeql_bundle_version="${codeql_cli_version}-${codeql_tag_name##*-}"
prior_codeql_bundle_version="${prior_codeql_cli_version}-${prior_codeql_tag_name##*-}"
extraction_directory="$AGENT_TOOLSDIRECTORY/CodeQL/$codeql_bundle_version/x64"
mkdir -p "$extraction_directory"
# Download and name both CodeQL bundles.
codeql_bundle_versions=("${codeql_bundle_version}" "${prior_codeql_bundle_version}")
codeql_tag_names=("${codeql_tag_name}" "${prior_codeql_tag_name}")
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"
for index in "${!codeql_bundle_versions[@]}"; do
bundle_version="${codeql_bundle_versions[$index]}"
bundle_tag_name="${codeql_tag_names[$index]}"
echo "Downloading CodeQL bundle $bundle_version..."
download_with_retries "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz" "/tmp" "codeql-bundle.tar.gz"
codeql_archive="/tmp/codeql-bundle.tar.gz"
# 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"
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
mkdir -p "$codeql_toolcache_path"
echo "Unpacking the downloaded CodeQL bundle archive..."
tar -xzf "$codeql_archive" -C "$codeql_toolcache_path"
# We only pin the latest version in the toolcache, to support overriding the CodeQL version specified in defaults.json on GitHub Enterprise.
if [[ "$bundle_version" == "$codeql_bundle_version" ]]; then
touch "$codeql_toolcache_path/pinned-version"
fi
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
touch "$codeql_toolcache_path.complete"
done
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
touch "$extraction_directory.complete"
+1 -11
View File
@@ -7,18 +7,8 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
FIREFOX_REPO="ppa:mozillateam/ppa"
# Install Firefox
add-apt-repository $FIREFOX_REPO -y
apt-get update
apt-get install --target-release 'o=LP-PPA-mozillateam' -y firefox
# Remove source repo's
add-apt-repository --remove $FIREFOX_REPO
# Document apt source repo's
echo "mozillateam $FIREFOX_REPO" >> $HELPER_SCRIPTS/apt-sources.txt
apt-get install -y firefox
# add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local.
# Default firefox local is en_GB
@@ -14,12 +14,6 @@ function GetChromiumRevision {
URL="https://omahaproxy.appspot.com/deps.json?version=${CHROME_VERSION}"
REVISION=$(curl -s $URL | jq -r '.chromium_base_position')
# both 110.0.5481.100 and 110.0.5481.96 return old incorrect revision
# nothing to compare with, hardcode temporarily.
if [ $REVISION -eq "839" ]; then
REVISION="1084008"
fi
# Some Google Chrome versions are based on Chromium revisions for which a (usually very old) Chromium release with the same number exist. So far this has heppened with 4 digits long Chromium revisions (1060, 1086).
# Use the previous Chromium release when this happens to avoid downloading and installing very old Chromium releases that would break image build because of incompatibilities.
# First reported with: https://github.com/actions/runner-images/issues/5256
+7 -2
View File
@@ -9,12 +9,10 @@ source $HELPER_SCRIPTS/etc-environment.sh
# Any nonzero value for noninteractive installation
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1
export GHCUP_INSTALL_BASE_PREFIX=/usr/local
export BOOTSTRAP_HASKELL_GHC_VERSION=0
ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin
setEtcEnvironmentVariable "BOOTSTRAP_HASKELL_NONINTERACTIVE" $BOOTSTRAP_HASKELL_NONINTERACTIVE
setEtcEnvironmentVariable "GHCUP_INSTALL_BASE_PREFIX" $GHCUP_INSTALL_BASE_PREFIX
# Install GHCup
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh > /dev/null 2>&1 || true
@@ -30,6 +28,13 @@ for majorMinorVersion in $minorMajorVersions; do
echo "install ghc version $fullVersion..."
ghcup install ghc $fullVersion
ghcup set ghc $fullVersion
# remove docs and profiling libs
ghc_dir="$(ghcup whereis basedir)/ghc/$fullVersion"
[ -e "${ghc_dir}" ] || exit 1
find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete
rm -r "${ghc_dir}"/share/*
unset ghc_bin_dir ghc_dir
done
echo "install cabal..."
@@ -22,6 +22,23 @@ setEtcEnvironmentVariable HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS 3650
echo "Validate the installation reloading /etc/environment"
reloadEtcEnvironment
# Install additional brew packages
# brew GCC installation needed because the default Ubuntu components
# are too old for current brew software
# See:
# https://github.com/Homebrew/homebrew-core/issues/110877
brew_packages=$(get_toolset_value .brew[].name)
for package in $brew_packages; do
echo "Install $package"
brew install $package
# create symlinks for zstd in /usr/local/bin
if [[ $package == "zstd" ]]; then
find $(brew --prefix)/bin -name *zstd* -exec sudo sh -c 'ln -s {} /usr/local/bin/$(basename {})' ';'
fi
done
gfortran=$(brew --prefix)/bin/gfortran
# Remove gfortran symlink, not to conflict with system gfortran
if [[ -e $gfortran ]]; then
+4 -3
View File
@@ -11,15 +11,16 @@ source $HELPER_SCRIPTS/install.sh
REPO_URL="https://repo.mongodb.org/apt/ubuntu"
osLabel=$(getOSVersionLabel)
toolsetVersion=$(get_toolset_value '.mongodb.version')
latestVersion=$(curl $REPO_URL/dists/$osLabel/mongodb-org/ | awk -F'>|<' '{print $3}' | grep "^$toolsetVersion" | tail -1)
# Install Mongo DB
wget -qO - https://www.mongodb.org/static/pgp/server-$toolsetVersion.asc | sudo apt-key add -
wget -qO - https://www.mongodb.org/static/pgp/server-$latestVersion.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] $REPO_URL $osLabel/mongodb-org/$toolsetVersion multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$toolsetVersion.list
echo "deb [ arch=amd64,arm64 ] $REPO_URL $osLabel/mongodb-org/$latestVersion multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$latestVersion.list
sudo apt-get update
sudo apt-get install -y mongodb-org
rm /etc/apt/sources.list.d/mongodb-org-$toolsetVersion.list
rm /etc/apt/sources.list.d/mongodb-org-$latestVersion.list
echo "mongodb $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
+5 -8
View File
@@ -9,12 +9,9 @@ source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/os.sh
source $HELPER_SCRIPTS/install.sh
# add repository for old Ubuntu images
# details in thread: https://github.com/actions/runner-images/issues/6331
if isUbuntu18 || isUbuntu20; then
apt-add-repository ppa:ondrej/php -y
apt-get update
fi
# add repository
apt-add-repository ppa:ondrej/php -y
apt-get update
# Install PHP
php_versions=$(get_toolset_value '.php.versions[]')
@@ -77,7 +74,7 @@ for version in $php_versions; do
apt-get install -y --no-install-recommends php$version-recode
fi
if [[ $version != "8.0" && $version != "8.1" && $version != "8.2" ]]; then
if [[ $version != "8.0" && $version != "8.1" ]]; then
apt-get install -y --no-install-recommends php$version-xmlrpc php$version-json
fi
done
@@ -106,7 +103,7 @@ mv phpunit /usr/local/bin/phpunit
# ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php
# see https://github.com/actions/runner-images/issues/1084
if isUbuntu20; then
if isUbuntu20 || isUbuntu22; then
rm /etc/apt/sources.list.d/ondrej-*.list
apt-get update
fi
@@ -4,9 +4,5 @@
## Desc: Installs powershellcore
################################################################################
source $HELPER_SCRIPTS/install.sh
pwshversion=$(get_toolset_value .pwsh.version)
# Install Powershell
apt-get install -y powershell=$pwshversion*
apt-get install -y powershell
+2 -2
View File
@@ -20,9 +20,9 @@ source $CARGO_HOME/env
rustup component add rustfmt clippy
if isUbuntu22; then
cargo install bindgen-cli cbindgen cargo-audit cargo-outdated
cargo install bindgen cbindgen cargo-audit cargo-outdated
else
cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated
cargo install --locked bindgen cbindgen cargo-audit cargo-outdated
fi
# Cleanup Cargo cache
@@ -10,8 +10,8 @@ source $HELPER_SCRIPTS/os.sh
# Install libssl1.1 dependency
if isUbuntu22; then
download_with_retries "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb" "/tmp"
dpkg -i /tmp/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
download_with_retries "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb" "/tmp"
dpkg -i /tmp/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
fi
# Install SqlPackage
+9 -16
View File
@@ -4,24 +4,17 @@
## Desc: Installs vcpkg
################################################################################
# Set env variable for vcpkg
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment
# Set env variables for vcpkg
VCPKG_ROOT=/usr/local/share/vcpkg
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment
echo "VCPKG_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment
# Install vcpkg
git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT
git clone https://github.com/Microsoft/vcpkg $VCPKG_ROOT
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
# workaround https://github.com/microsoft/vcpkg/issues/27786
mkdir -p /root/.vcpkg/ $HOME/.vcpkg
touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
chmod 0777 -R $VCPKG_INSTALLATION_ROOT
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin
rm -rf /root/.vcpkg $HOME/.vcpkg
$VCPKG_ROOT/bootstrap-vcpkg.sh
$VCPKG_ROOT/vcpkg integrate install
chmod 0777 -R $VCPKG_ROOT
ln -sf $VCPKG_ROOT/vcpkg /usr/local/bin
invoke_tests "Tools" "Vcpkg"
-22
View File
@@ -1,22 +0,0 @@
#!/bin/bash -e
################################################################################
## File: zstd.sh
## Desc: Installs zstd
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
apt-get install -y liblz4-dev
release_tag=$(curl https://api.github.com/repos/facebook/zstd/releases/latest | jq -r '.tag_name')
zstd_tar_name=zstd-${release_tag//v}.tar.gz
URL=https://github.com/facebook/zstd/releases/download/${release_tag}/${zstd_tar_name}
download_with_retries "${URL}" "/tmp" "${zstd_tar_name}"
tar xzf /tmp/$zstd_tar_name -C /tmp
make -C /tmp/zstd-${release_tag//v}/contrib/pzstd all
make -C /tmp/zstd-${release_tag//v} zstd-release
for copyprocess in zstd zstdless zstdgrep; do cp /tmp/zstd-${release_tag//v}/programs/$copyprocess /usr/local/bin/; done
cp /tmp/zstd-${release_tag//v}/contrib/pzstd/pzstd /usr/local/bin/
for symlink in zstdcat zstdmt unzstd; do ln -sf /usr/local/bin/zstd /usr/local/bin/$symlink; done
invoke_tests "Tools" "Zstd"
@@ -1,4 +1,4 @@
Describe "Firefox" {
Describe "Firefox" -Skip:(Test-IsUbuntu22) {
It "Firefox" {
"sudo -i firefox --version" | Should -ReturnZeroExitCode
}
+1 -1
View File
@@ -29,7 +29,7 @@ Describe "PHP" {
}
}
Describe "Swift" {
Describe "Swift" -Skip:(Test-IsUbuntu22) {
It "swift" {
"swift --version" | Should -ReturnZeroExitCode
}
@@ -31,8 +31,4 @@ Describe "Haskell" {
It "Stack" {
"stack --version" | Should -ReturnZeroExitCode
}
It "Stack hook is not installed" {
"$HOME/.stack/hooks/ghc-install.sh" | Should -Not -Exist
}
}
+19 -11
View File
@@ -132,7 +132,7 @@ Describe "Cmake" {
}
}
Describe "erlang" -Skip:((Test-IsUbuntu22) -or (Test-IsUbuntu18)) {
Describe "erlang" -Skip:(Test-IsUbuntu22) {
$testCases = @("erl -version", "erlc -v", "rebar3 -v") | ForEach-Object { @{ErlangCommand = $_} }
It "erlang <ErlangCommand>" -TestCases $testCases {
@@ -220,16 +220,6 @@ Describe "Terraform" {
}
}
Describe "Zstd" {
It "zstd" {
"zstd --version" | Should -ReturnZeroExitCode
}
It "pzstd" {
"pzstd --version" | Should -ReturnZeroExitCode
}
}
Describe "Vcpkg" {
It "vcpkg" {
"vcpkg version" | Should -ReturnZeroExitCode
@@ -267,9 +257,23 @@ Describe "HHVM" -Skip:(Test-IsUbuntu22) {
}
Describe "Homebrew" {
$brewToolset = (Get-ToolsetContent).brew
$testCases = $brewToolset | ForEach-Object { @{brewName = $_.name; brewCommand = $_.command} }
It "homebrew" {
"/home/linuxbrew/.linuxbrew/bin/brew --version" | Should -ReturnZeroExitCode
}
It "zstd has /usr/local/bin symlink" {
"/usr/local/bin/zstd" | Should -Exist
}
It "homebrew package <brewName>" -TestCases $testCases {
$brewPrefix = /home/linuxbrew/.linuxbrew/bin/brew --prefix $brewName
$brewPackage = Join-Path $brewPrefix "bin" $brewCommand
"$brewPackage --version" | Should -ReturnZeroExitCode
}
}
Describe "Julia" {
@@ -412,6 +416,10 @@ Describe "Kotlin" {
"kotlinc -version"| Should -ReturnZeroExitCode
}
It "kotlinc-js" {
"kotlinc-js -version"| Should -ReturnZeroExitCode
}
It "kotlinc-jvm" {
"kotlinc-jvm -version"| Should -ReturnZeroExitCode
}
@@ -60,19 +60,6 @@ Describe "Toolset" {
}
}
}
# Validate that there are two versions of CodeQL included.
if ($toolName -eq "CodeQL") {
$foundPriorVersion = Get-Item $expectedVersionPath `
| Sort-Object -Property {[SemVer]$_.name} -Descending `
| Select-Object -Last 1
$foundPriorVersionPath = Join-Path $foundPriorVersion $tool.arch
$priorExecutablePath = Join-Path $foundPriorVersionPath "codeql/codeql"
It "Validate prior version of codeql/codeql" -TestCases @{PriorExecutablePath = $priorExecutablePath} {
$PriorExecutablePath | Should -Exist
}
}
}
}
}
+20 -17
View File
@@ -12,8 +12,7 @@
"3.7.*",
"3.8.*",
"3.9.*",
"3.10.*",
"3.11.*"
"3.10.*"
]
},
{
@@ -32,9 +31,9 @@
"platform" : "linux",
"arch": "x64",
"versions": [
"12.*",
"14.*",
"16.*",
"18.*"
"16.*"
]
},
{
@@ -84,9 +83,10 @@
"versions": [ "8", "11", "12" ]
}
],
"maven": "3.9.0"
"maven": "3.8.6"
},
"android": {
"cmdline-tools": "latest",
"platform_min_version": "23",
"build_tools_min_version": "23.0.1",
"extra_list": [
@@ -122,14 +122,13 @@
"name": "az",
"url" : "https://raw.githubusercontent.com/Azure/az-ps-module-versions/main/versions-manifest.json",
"versions": [
"9.3.0"
"7.5.0"
],
"zip_versions": [
"3.1.0",
"4.4.0",
"5.9.0",
"6.6.0",
"7.5.0"
"6.6.0"
]
}
],
@@ -159,7 +158,6 @@
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libyaml-dev",
"libtool",
"libunwind8",
"libxkbfile-dev",
@@ -171,7 +169,6 @@
"pkg-config",
"python-setuptools",
"rpm",
"tar",
"texinfo",
"tk",
"tzdata",
@@ -220,6 +217,14 @@
]
},
"brew": [
{
"name": "gcc@12",
"command": "gcc-12"
},
{
"name": "zstd",
"command": "zstd"
}
],
"docker": {
"images": [
@@ -233,12 +238,12 @@
"debian:10",
"debian:11",
"moby/buildkit:latest",
"node:12",
"node:14",
"node:16",
"node:18",
"node:12-alpine",
"node:14-alpine",
"node:16-alpine",
"node:18-alpine",
"ubuntu:16.04",
"ubuntu:18.04",
"ubuntu:20.04"
@@ -257,10 +262,12 @@
"dotnet": {
"aptPackages": [
"dotnet-sdk-3.1",
"dotnet-sdk-5.0",
"dotnet-sdk-6.0"
],
"versions": [
"3.1",
"5.0",
"6.0"
],
"tools": [
@@ -291,8 +298,7 @@
"7.3",
"7.4",
"8.0",
"8.1",
"8.2"
"8.1"
]
},
"selenium": {
@@ -354,8 +360,5 @@
},
"postgresql": {
"version": "14"
},
"pwsh": {
"version": "7.2"
}
}
+25 -26
View File
@@ -12,8 +12,7 @@
"3.7.*",
"3.8.*",
"3.9.*",
"3.10.*",
"3.11.*"
"3.10.*"
]
},
{
@@ -34,9 +33,9 @@
"platform" : "linux",
"arch": "x64",
"versions": [
"12.*",
"14.*",
"16.*",
"18.*"
"16.*"
]
},
{
@@ -47,8 +46,7 @@
"versions": [
"1.17.*",
"1.18.*",
"1.19.*",
"1.20.*"
"1.19.*"
],
"default": "1.17.*"
},
@@ -86,7 +84,7 @@
"versions": [ "8", "11" ]
}
],
"maven": "3.9.0"
"maven": "3.8.6"
},
"android": {
"cmdline-tools": "latest",
@@ -122,14 +120,13 @@
"name": "az",
"url" : "https://raw.githubusercontent.com/Azure/az-ps-module-versions/main/versions-manifest.json",
"versions": [
"9.3.0"
"7.5.0"
],
"zip_versions": [
"3.1.0",
"4.4.0",
"5.9.0",
"6.6.0",
"7.5.0"
"6.6.0"
]
}
],
@@ -160,7 +157,6 @@
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libyaml-dev",
"libtool",
"libunwind8",
"libxkbfile-dev",
@@ -172,7 +168,6 @@
"pkg-config",
"python-is-python3",
"rpm",
"tar",
"texinfo",
"tk",
"tzdata",
@@ -222,12 +217,20 @@
]
},
"brew": [
{
"name": "gcc@12",
"command": "gcc-12"
},
{
"name": "zstd",
"command": "zstd"
}
],
"docker": {
"images": [
"alpine:3.12",
"alpine:3.13",
"alpine:3.14",
"alpine:3.15",
"alpine:3.16",
"buildpack-deps:stretch",
"buildpack-deps:buster",
"buildpack-deps:bullseye",
@@ -235,12 +238,12 @@
"debian:10",
"debian:11",
"moby/buildkit:latest",
"node:12",
"node:14",
"node:16",
"node:18",
"node:12-alpine",
"node:14-alpine",
"node:16-alpine",
"node:18-alpine",
"ubuntu:16.04",
"ubuntu:18.04",
"ubuntu:20.04"
@@ -259,13 +262,13 @@
"dotnet": {
"aptPackages": [
"dotnet-sdk-3.1",
"dotnet-sdk-6.0",
"dotnet-sdk-7.0"
"dotnet-sdk-5.0",
"dotnet-sdk-6.0"
],
"versions": [
"3.1",
"6.0",
"7.0"
"5.0",
"6.0"
],
"tools": [
{ "name": "nbgv", "test": "nbgv --version", "getversion" : "nbgv --version" }
@@ -295,8 +298,7 @@
"versions": [
"7.4",
"8.0",
"8.1",
"8.2"
"8.1"
]
},
"rubygems": [
@@ -307,7 +309,7 @@
"binary_name": "selenium-server"
},
"node": {
"default": "18"
"default": "16"
},
"node_modules": [
{
@@ -364,8 +366,5 @@
},
"postgresql": {
"version": "14"
},
"pwsh": {
"version": "7.2"
}
}
+14 -26
View File
@@ -10,8 +10,7 @@
"3.7.*",
"3.8.*",
"3.9.*",
"3.10.*",
"3.11.*"
"3.10.*"
]
},
{
@@ -31,8 +30,7 @@
"arch": "x64",
"versions": [
"14.*",
"16.*",
"18.*"
"16.*"
]
},
{
@@ -43,8 +41,7 @@
"versions": [
"1.17.*",
"1.18.*",
"1.19.*",
"1.20.*"
"1.19.*"
],
"default": "1.18.*"
},
@@ -74,7 +71,7 @@
"versions": [ "8", "11", "17" ]
}
],
"maven": "3.9.0"
"maven": "3.8.6"
},
"android": {
"cmdline-tools": "latest",
@@ -110,7 +107,7 @@
"name": "az",
"url" : "https://raw.githubusercontent.com/Azure/az-ps-module-versions/main/versions-manifest.json",
"versions": [
"9.3.0"
"7.5.0"
],
"zip_versions": [
]
@@ -143,7 +140,6 @@
"libmagickwand-dev",
"libsecret-1-dev",
"libsqlite3-dev",
"libyaml-dev",
"libtool",
"libunwind8",
"libxkbfile-dev",
@@ -156,7 +152,6 @@
"pkg-config",
"python-is-python3",
"rpm",
"tar",
"texinfo",
"tk",
"tzdata",
@@ -180,7 +175,6 @@
"ftp",
"haveged",
"jq",
"lz4",
"m4",
"mediainfo",
"netcat",
@@ -207,12 +201,15 @@
]
},
"brew": [
{
"name": "zstd",
"command": "zstd"
}
],
"docker": {
"images": [
"alpine:3.14",
"alpine:3.15",
"alpine:3.16",
"buildpack-deps:buster",
"buildpack-deps:bullseye",
"debian:10",
@@ -220,10 +217,8 @@
"moby/buildkit:latest",
"node:14",
"node:16",
"node:18",
"node:14-alpine",
"node:16-alpine",
"node:18-alpine",
"ubuntu:18.04",
"ubuntu:20.04",
"ubuntu:22.04"
@@ -241,12 +236,10 @@
],
"dotnet": {
"aptPackages": [
"dotnet-sdk-6.0",
"dotnet-sdk-7.0"
"dotnet-sdk-6.0"
],
"versions": [
"6.0",
"7.0"
"6.0"
],
"tools": [
{ "name": "nbgv", "test": "nbgv --version", "getversion" : "nbgv --version" }
@@ -263,15 +256,13 @@
"gcc": {
"versions": [
"g++-9",
"g++-10",
"g++-12"
"g++-10"
]
},
"gfortran": {
"versions": [
"gfortran-9",
"gfortran-10",
"gfortran-12"
"gfortran-10"
]
},
"php": {
@@ -287,7 +278,7 @@
"binary_name": "selenium-server"
},
"node": {
"default": "18"
"default": "16"
},
"node_modules": [
{
@@ -344,8 +335,5 @@
},
"postgresql": {
"version": "14"
},
"pwsh": {
"version": "7.2"
}
}
+3 -14
View File
@@ -120,11 +120,6 @@
"source": "{{ template_dir }}/scripts/SoftwareReport",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{ template_dir }}/../../helpers/software-report-base",
"destination": "{{user `image_folder`}}/SoftwareReport/"
},
{
"type": "file",
"source": "{{template_dir}}/toolsets/toolset-1804.json",
@@ -206,6 +201,7 @@
"{{template_dir}}/scripts/installers/codeql-bundle.sh",
"{{template_dir}}/scripts/installers/containers.sh",
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
"{{template_dir}}/scripts/installers/erlang.sh",
"{{template_dir}}/scripts/installers/firefox.sh",
"{{template_dir}}/scripts/installers/microsoft-edge.sh",
"{{template_dir}}/scripts/installers/gcc.sh",
@@ -251,8 +247,7 @@
"{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh",
"{{template_dir}}/scripts/installers/python.sh",
"{{template_dir}}/scripts/installers/aws.sh",
"{{template_dir}}/scripts/installers/zstd.sh"
"{{template_dir}}/scripts/installers/aws.sh"
],
"environment_vars": [
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
@@ -336,16 +331,10 @@
},
{
"type": "file",
"source": "{{user `image_folder`}}/software-report.md",
"source": "{{user `image_folder`}}/Ubuntu-Readme.md",
"destination": "{{template_dir}}/Ubuntu1804-Readme.md",
"direction": "download"
},
{
"type": "file",
"source": "{{user `image_folder`}}/software-report.json",
"destination": "{{template_dir}}/software-report.json",
"direction": "download"
},
{
"type": "shell",
"scripts":[
+2 -14
View File
@@ -120,11 +120,6 @@
"source": "{{ template_dir }}/scripts/SoftwareReport",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{ template_dir }}/../../helpers/software-report-base",
"destination": "{{user `image_folder`}}/SoftwareReport/"
},
{
"type": "file",
"source": "{{template_dir}}/toolsets/toolset-2004.json",
@@ -253,8 +248,7 @@
"{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh",
"{{template_dir}}/scripts/installers/python.sh",
"{{template_dir}}/scripts/installers/graalvm.sh",
"{{template_dir}}/scripts/installers/zstd.sh"
"{{template_dir}}/scripts/installers/graalvm.sh"
],
"environment_vars": [
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
@@ -342,16 +336,10 @@
},
{
"type": "file",
"source": "{{user `image_folder`}}/software-report.md",
"source": "{{user `image_folder`}}/Ubuntu-Readme.md",
"destination": "{{template_dir}}/Ubuntu2004-Readme.md",
"direction": "download"
},
{
"type": "file",
"source": "{{user `image_folder`}}/software-report.json",
"destination": "{{template_dir}}/software-report.json",
"direction": "download"
},
{
"type": "shell",
"scripts":[
+2 -16
View File
@@ -234,11 +234,6 @@ build {
source = "${path.root}/scripts/SoftwareReport"
}
provisioner "file" {
destination = "${var.image_folder}/SoftwareReport/"
source = "${path.root}/../../helpers/software-report-base"
}
provisioner "file" {
destination = "${var.installer_script_folder}/toolset.json"
source = "${path.root}/toolsets/toolset-2204.json"
@@ -287,12 +282,10 @@ build {
"${path.root}/scripts/installers/apache.sh",
"${path.root}/scripts/installers/aws.sh",
"${path.root}/scripts/installers/clang.sh",
"${path.root}/scripts/installers/swift.sh",
"${path.root}/scripts/installers/cmake.sh",
"${path.root}/scripts/installers/codeql-bundle.sh",
"${path.root}/scripts/installers/containers.sh",
"${path.root}/scripts/installers/dotnetcore-sdk.sh",
"${path.root}/scripts/installers/firefox.sh",
"${path.root}/scripts/installers/microsoft-edge.sh",
"${path.root}/scripts/installers/gcc.sh",
"${path.root}/scripts/installers/gfortran.sh",
@@ -334,8 +327,7 @@ build {
"${path.root}/scripts/installers/android.sh",
"${path.root}/scripts/installers/pypy.sh",
"${path.root}/scripts/installers/python.sh",
"${path.root}/scripts/installers/graalvm.sh",
"${path.root}/scripts/installers/zstd.sh"
"${path.root}/scripts/installers/graalvm.sh"
]
}
@@ -388,13 +380,7 @@ build {
provisioner "file" {
destination = "${path.root}/Ubuntu2204-Readme.md"
direction = "download"
source = "${var.image_folder}/software-report.md"
}
provisioner "file" {
destination = "${path.root}/software-report.json"
direction = "download"
source = "${var.image_folder}/software-report.json"
source = "${var.image_folder}/Ubuntu-Readme.md"
}
provisioner "shell" {
+3 -1
View File
@@ -31,9 +31,11 @@ function Get-OSVersion {
return [PSCustomObject]@{
Version = $osVersion.Version
Platform = $osVersion.Platform
IsCatalina = $osVersionMajorMinor -eq "10.15"
IsBigSur = $osVersion.Version.Major -eq "11"
IsMonterey = $osVersion.Version.Major -eq "12"
IsVentura = $osVersion.Version.Major -eq "13"
IsLessThanMonterey = $osVersion.Version.Major -lt "12"
IsHigherThanCatalina = $osVersion.Version.Major -ge "11"
}
}
@@ -23,6 +23,14 @@ function Take-Part {
return [string]::Join($Delimiter, $selectedParts)
}
function New-MDNewLine {
param (
[int] $Count = 1
)
$newLineSymbol = [System.Environment]::NewLine
return $newLineSymbol * $Count
}
function Get-LinkTarget {
param (
[string] $inputPath
@@ -52,3 +60,61 @@ function Get-BrewPackageVersion {
return $packageVersion
}
function Get-CachedToolInstances {
<#
.SYNOPSIS
Returns hashtable of installed cached tools.
.DESCRIPTION
Return hashtable that contains versions and architectures for the selected cached tool.
.PARAMETER Name
Name of cached tool.
.PARAMETER VersionCommand
Optional parameter. Command to return version of system default tool.
.EXAMPLE
Get-CachedToolInstances -Name "Python" -VersionCommand "--version"
#>
param
(
[String] $Name,
[String] $VersionCommand
)
$toolInstances = @()
$toolPath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $Name
# Get all installed versions from TOOLSDIRECTORY folder
$versions = Get-ChildItem $toolPath | Sort-Object { [System.Version]$_.Name }
foreach ($version in $versions) {
$instanceInfo = @{}
# Create instance hashtable
[string]$instanceInfo.Path = Join-Path -Path $toolPath -ChildPath $version.Name
[string]$instanceInfo.Version = $version.Name
# Get all architectures for current version
[array]$instanceInfo.Architecture_Array = Get-ChildItem $version.FullName -Name -Directory | Where-Object { $_ -match "^x[0-9]{2}$" }
[string]$instanceInfo.Architecture = $instanceInfo.Architecture_Array -Join ", "
# Add (default) postfix to version name, in case if current version is in environment path
if (-not ([string]::IsNullOrEmpty($VersionCommand))) {
$defaultVersion = $(& ($Name.ToLower()) $VersionCommand 2>&1)
$defaultToolVersion = $defaultVersion | Select-String -Pattern "\d+\.\d+\.\d+" -AllMatches `
| ForEach-Object { $_.Matches.Value }
if ([version]$version.Name -eq [version]$defaultToolVersion) {
$instanceInfo.Version += " (Default)"
}
}
$toolInstances += $instanceInfo
}
return $toolInstances
}
+1 -1
View File
@@ -132,7 +132,7 @@ function Invoke-PesterTests {
$configuration = [PesterConfiguration] @{
Run = @{ Path = $testPath; PassThru = $true }
Output = @{ Verbosity = "Detailed"; RenderMode = "Plaintext" }
Output = @{ Verbosity = "Detailed" }
}
if ($TestName) {
$configuration.Filter.FullName = $TestName
-154
View File
@@ -151,158 +151,4 @@ function Invoke-XCVersion {
if ($result.ExitCode -ne 0) {
throw "Command [$Command] has finished with non-zero exit code."
}
}
function Get-BrokenXcodeSimulatorsList {
return @(
# tvOS Simulators
@{
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-2";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-15-4";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple TV 4K (at 1080p) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.tvOS-16-0";
XcodeVersion = "14.2"
},
# watchOS-8-0 Simulators
@{
SimulatorName = "Apple Watch Series 5 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple Watch Series 5 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 41mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 45mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-0";
XcodeVersion = "13.1"
},
# watchOS-8-3 Simulators
@{
SimulatorName = "Apple Watch Series 5 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple Watch Series 5 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 41mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 45mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-3";
XcodeVersion = "13.2.1"
},
# watchOS-8-5 Simulators
@{
SimulatorName = "Apple Watch Series 5 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple Watch Series 5 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 40mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-40mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple Watch Series 6 - 44mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-6-44mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 41mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-41mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
@{
SimulatorName = "Apple Watch Series 7 - 45mm"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-7-45mm";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-8-5";
XcodeVersion = "13.4.1"
},
# watchOS-9-0 Simulators
@{
SimulatorName = "Apple Watch SE (40mm) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-SE-40mm-2nd-generation";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-9-0";
XcodeVersion = "14.2"
},
@{
SimulatorName = "Apple Watch SE (44mm) (2nd generation)"
DeviceId = "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-SE-44mm-2nd-generation";
RuntimeId = "com.apple.CoreSimulator.SimRuntime.watchOS-9-0";
XcodeVersion = "14.2"
}
)
}
-16
View File
@@ -160,22 +160,6 @@ function Invoke-XcodeRunFirstLaunch {
Invoke-ValidateCommand "sudo $xcodeRootPath -runFirstLaunch"
}
function Install-AdditionalSimulatorRuntimes {
param(
[Parameter(Mandatory)]
[string]$Version
)
if (-not $Version.StartsWith("14.")) {
# Additional simulator runtimes are included by default for Xcode < 14
return
}
Write-Host "Installing Simulator Runtimes for Xcode $($_.link) ..."
$xcodebuildPath = Get-XcodeToolPath -Version $Version -ToolName "xcodebuild"
Invoke-ValidateCommand "$xcodebuildPath -downloadAllPlatforms"
}
function Build-XcodeSymlinks {
param(
[Parameter(Mandatory)]
+61 -62
View File
@@ -1,17 +1,16 @@
| Announcements |
|-|
| [macOS-latest workflows will use macOS-12](https://github.com/actions/runner-images/issues/6384) |
| [[all OSs] The VCPKG_ROOT variable will be removed from runner images](https://github.com/actions/runner-images/issues/6376) |
| [[macOS] Default Xcode on macOS 12 Monterey will be set to Xcode 14.0 on September, 26](https://github.com/actions/runner-images/issues/6225) |
| [The macOS 10.15 Actions runner image will begin deprecation on 5/31/22 and will be fully unsupported by 12/1/22 for GitHub and ADO](https://github.com/actions/runner-images/issues/5583) |
***
# macOS 10.15 info
- System Version: macOS 10.15.7 (19H2026)
- Kernel Version: Darwin 19.6.0
- Image Version: 20221018.1
- Image Version: 20220912.1
## Installed Software
### Language and Runtime
- .NET SDK 3.1.101 3.1.201 3.1.302 3.1.424 5.0.102 5.0.202 5.0.302 5.0.408
- .NET SDK 3.1.101 3.1.201 3.1.302 3.1.422 5.0.102 5.0.202 5.0.302 5.0.408
- Bash 3.2.57(1)-release
- Clang/LLVM 12.0.0 is default
- Clang/LLVM 14.0.6 is available on `'$(brew --prefix llvm@14)/bin/clang'`
@@ -22,33 +21,33 @@
- GNU Fortran (Homebrew GCC 10.4.0) 10.4.0 - available by `gfortran-10` alias
- GNU Fortran (Homebrew GCC 11.3.0) 11.3.0 - available by `gfortran-11` alias
- Go 1.17.13
- julia 1.8.2
- Kotlin 1.7.20-release-201
- julia 1.8.1
- Kotlin 1.7.10-release-333
- MSBuild 16.10.1.31401 (from /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node.js v16.18.0
- NVM 0.39.2
- NVM - Cached node versions: v12.22.12 v14.20.1 v16.18.0
- Perl 5.36.0
- PHP 8.1.11
- Node.js v16.17.0
- NVM 0.39.1
- NVM - Cached node versions: v12.22.12 v14.20.0 v16.17.0
- Perl 5.34.0
- PHP 8.1.10
- Python 2.7.18
- Python 3.10.8
- Python 3.10.6
- R 4.2.1
- Ruby 2.7.6p219
### Package Management
- Bundler version 2.3.24
- Bundler version 2.3.22
- Carthage 0.38.0
- CocoaPods 1.11.3
- Composer 2.4.3
- Homebrew 3.6.6
- Composer 2.4.1
- Homebrew 3.6.1
- Miniconda 4.12.0
- NPM 8.19.2
- NPM 8.15.0
- NuGet 6.2.1.2
- Pip 20.3.4 (python 2.7)
- Pip 22.2.2 (python 3.10)
- Pipx 1.1.0
- RubyGems 3.3.24
- Vcpkg 2022 (build from master \<f4b262b25>)
- RubyGems 3.3.22
- Vcpkg 2022 (build from master \<23905f6f8>)
- Yarn 1.22.19
#### Environment variables
@@ -62,26 +61,26 @@
- Apache Ant(TM) 1.10.12
- Apache Maven 3.8.6
- Gradle 7.5.1
- Sbt 1.7.2
- Sbt 1.7.1
### Utilities
- 7-Zip 17.04
- aria2 1.36.0
- azcopy 10.16.1
- bazel 5.3.1
- azcopy 10.16.0
- bazel 5.3.0
- bazelisk 1.14.0
- bsdtar 3.3.2 - available by 'tar' alias
- Curl 7.85.0
- Git 2.38.1
- Git 2.37.3
- Git LFS: 3.2.0
- GitHub CLI: 2.18.0
- GNU parallel 20220922
- GitHub CLI: 2.15.0
- GNU parallel 20220822
- GNU Tar 1.34 - available by 'gtar' alias
- GNU Wget 1.21.3
- gpg (GnuPG) 2.3.8
- helm v3.10.1+g9f88ccb
- gpg (GnuPG) 2.3.7
- helm v3.9.4+gdbc6d8e
- Hub CLI: 2.14.2
- ImageMagick 7.1.0-51
- ImageMagick 7.1.0-47
- jq 1.6
- mongo v5.0.11
- mongod v5.0.11
@@ -93,28 +92,28 @@
- Sox 14.4.2
- Subversion (SVN) 1.14.2
- Switchaudio-osx 1.1.0
- Vagrant 2.3.1
- Vagrant 2.3.0
- VirtualBox 6.1.38r153438
- yq (https://github.com/mikefarah/yq/) version 4.28.1
- yq (https://github.com/mikefarah/yq/) version 4.27.5
- zstd 1.5.2
### Tools
- Aliyun CLI 3.0.131
- Aliyun CLI 3.0.125
- App Center CLI 2.11.0
- AWS CLI 2.8.3
- AWS SAM CLI 1.60.0
- AWS Session Manager CLI 1.2.398.0
- AWS CLI 2.7.31
- AWS SAM CLI 1.56.1
- AWS Session Manager CLI 1.2.339.0
- Azure CLI (azure-devops) 0.25.0
- Azure CLI 2.41.0
- Bicep CLI 0.11.1
- Azure CLI 2.40.0
- Bicep CLI 0.10.13
- Cabal 3.6.2.0
- Cmake 3.24.2
- Fastlane 2.210.1
- Cmake 3.24.1
- Fastlane 2.209.1
- GHC 9.4.2
- GHCup 0.1.18.0
- Jazzy 0.14.3
- Stack 2.9.1
- SwiftFormat 0.50.2
- Stack 2.7.5
- SwiftFormat 0.49.18
- Swig 4.0.2
- Xcode Command Line Tools 12.4.0.0.1.1610135815
@@ -125,18 +124,18 @@
### Browsers
- Safari 15.6.1 (15613.3.9.1.16)
- SafariDriver 15.6.1 (15613.3.9.1.16)
- Google Chrome 106.0.5249.119
- ChromeDriver 106.0.5249.61
- Microsoft Edge 106.0.1370.47
- Microsoft Edge WebDriver 106.0.1370.47
- Mozilla Firefox 105.0.3
- geckodriver 0.32.0
- Selenium server 4.5.0
- Google Chrome 105.0.5195.102
- ChromeDriver 105.0.5195.52
- Microsoft Edge 105.0.1343.33
- Microsoft Edge WebDriver 105.0.1343.34
- Mozilla Firefox 104.0.2
- geckodriver 0.31.0
- Selenium server 4.4.0
#### Environment variables
| Name | Value |
| --------------- | ---------------------------------------------- |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/106.0.5249.61 |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/105.0.5195.52 |
| EDGEWEBDRIVER | /usr/local/share/edge_driver |
| GECKOWEBDRIVER | /usr/local/opt/geckodriver/bin |
@@ -166,10 +165,10 @@
#### Python
- 2.7.18
- 3.6.15
- 3.7.15
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.8
- 3.10.7
#### PyPy
- 2.7.18 [PyPy 7.3.9]
@@ -180,28 +179,28 @@
#### Node.js
- 12.22.12
- 14.20.1
- 16.17.1
- 14.20.0
- 16.17.0
#### Go
| Version | Architecture | Environment Variable |
| ------- | ------------ | -------------------- |
| 1.16.15 | x64 | GOROOT_1_16_X64 |
| 1.17.13 (Default) | x64 | GOROOT_1_17_X64 |
| 1.18.7 | x64 | GOROOT_1_18_X64 |
| 1.18.6 | x64 | GOROOT_1_18_X64 |
### Rust Tools
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Cargo 1.63.0
- Rust 1.63.0
- Rustdoc 1.63.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.61.0
- Cargo-audit 0.17.2
- Bindgen 0.60.1
- Cargo-audit 0.17.0
- Cargo-outdated 0.11.1
- Cbindgen 0.24.3
- Clippy 0.1.64
- Clippy 0.1.63
- Rustfmt 1.5.1-stable
### PowerShell Tools
@@ -210,10 +209,10 @@
#### PowerShell Modules
| Module | Version |
| ---------------- | ------- |
| Az | 9.0.1 |
| Az | 8.3.0 |
| MarkdownPS | 1.9 |
| Pester | 5.3.3 |
| PSScriptAnalyzer | 1.21.0 |
| PSScriptAnalyzer | 1.20.0 |
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
@@ -363,7 +362,7 @@
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.12 |
| Android Emulator | 31.3.10 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3<br>26.0.0 26.0.1 26.0.2 26.0.3<br>25.0.0 25.0.1 25.0.2 25.0.3<br>24.0.0 24.0.1 24.0.2 24.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3)<br>android-26 (rev 2)<br>android-25 (rev 3)<br>android-24 (rev 2) |
| Android SDK Platform-Tools | 33.0.3 |
@@ -390,7 +389,7 @@
- libXext 1.3.4
- libXft 2.3.6
- Tcl/Tk 8.6.12_1
- Zlib 1.2.13
- Zlib 1.2.12
+154 -155
View File
@@ -1,57 +1,53 @@
| Announcements |
|-|
| [GCC-9 will be removed from macOS 11 on March, 6](https://github.com/actions/runner-images/issues/7136) |
| [Xcode 13.4 will be pointing to 13.4.1 on February, 27](https://github.com/actions/runner-images/issues/7127) |
| [[macOS] Default Xcode on macOS 12 Monterey will be set to Xcode 14.0.1 on September, 26](https://github.com/actions/runner-images/issues/6225) |
| [The macOS 10.15 Actions runner image will begin deprecation on 5/31/22 and will be fully unsupported by 12/1/22 for GitHub and ADO](https://github.com/actions/runner-images/issues/5583) |
***
# macOS 11
- OS Version: macOS 11.7.4 (20G1120)
# macOS 11.7 info
- System Version: macOS 11.7 (20G817)
- Kernel Version: Darwin 20.6.0
- Image Version: 20230223.3
- Image Version: 20220925.1
## Installed Software
### Language and Runtime
- .NET Core SDK: 3.1.101, 3.1.201, 3.1.302, 3.1.426, 6.0.406, 7.0.102, 7.0.200
- .NET SDK 3.1.101 3.1.201 3.1.302 3.1.423 5.0.102 5.0.202 5.0.302 5.0.408 6.0.401
- Bash 3.2.57(1)-release
- Clang/LLVM 13.0.0
- Clang/LLVM (Homebrew) 15.0.7 - available on `$(brew --prefix llvm@15)/bin/clang`
- GCC 9 (Homebrew GCC 9.5.0) - available by `gcc-9` alias
- GCC 10 (Homebrew GCC 10.4.0) - available by `gcc-10` alias
- GCC 11 (Homebrew GCC 11.3.0) - available by `gcc-11` alias
- GCC 12 (Homebrew GCC 12.2.0) - available by `gcc-12` alias
- GNU Fortran 9 (Homebrew GCC 9.5.0) - available by `gfortran-9` alias
- GNU Fortran 10 (Homebrew GCC 10.4.0) - available by `gfortran-10` alias
- GNU Fortran 11 (Homebrew GCC 11.3.0) - available by `gfortran-11` alias
- GNU Fortran 12 (Homebrew GCC 12.2.0) - available by `gfortran-12` alias
- Clang/LLVM 13.0.0 is default
- Clang/LLVM 14.0.6 is available on `'$(brew --prefix llvm@14)/bin/clang'`
- gcc-9 (Homebrew GCC 9.5.0) 9.5.0 - available by `gcc-9` alias
- gcc-10 (Homebrew GCC 10.4.0) 10.4.0 - available by `gcc-10` alias
- gcc-11 (Homebrew GCC 11.3.0) 11.3.0 - available by `gcc-11` alias
- GNU Fortran (Homebrew GCC 9.5.0) 9.5.0 - available by `gfortran-9` alias
- GNU Fortran (Homebrew GCC 10.4.0) 10.4.0 - available by `gfortran-10` alias
- GNU Fortran (Homebrew GCC 11.3.0) 11.3.0 - available by `gfortran-11` alias
- Go 1.17.13
- Julia 1.8.5
- Kotlin 1.8.10-release-430
- Mono 6.12.0.188
- MSBuild 16.10.1.51301 (Mono 6.12.0.188)
- Node.js 18.14.2
- NVM 0.39.3
- NVM - Cached node versions: 14.21.3, 16.19.1, 18.14.2
- Perl 5.36.0
- PHP 8.2.3
- julia 1.8.1
- Kotlin 1.7.10-release-333
- MSBuild 16.10.1.31401 (from /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node.js v16.17.1
- NVM 0.39.1
- NVM - Cached node versions: v12.22.12 v14.20.1 v16.17.1
- Perl 5.34.0
- PHP 8.1.10
- Python 2.7.18
- Python3 3.11.2
- R 4.2.2
- Ruby 2.7.7p221
- Python 3.10.6
- R 4.2.1
- Ruby 2.7.6p219
### Package Management
- Bundler 2.4.7
- Carthage 0.39.0
- Bundler version 2.3.22
- Carthage 0.38.0
- CocoaPods 1.11.3
- Composer 2.5.4
- Homebrew 4.0.3
- Miniconda 23.1.0
- NPM 9.5.0
- NuGet 6.3.1.1
- Composer 2.4.2
- Homebrew 3.6.2
- Miniconda 4.12.0
- NPM 8.15.0
- NuGet 6.2.1.2
- Pip 20.3.4 (python 2.7)
- Pip3 23.0.1 (python 3.11)
- Pip 22.2.2 (python 3.10)
- Pipx 1.1.0
- RubyGems 3.4.7
- Vcpkg 2023 (build from commit 82e03905f)
- RubyGems 3.3.22
- Vcpkg 2022 (build from master \<57d3194e7>)
- Yarn 1.22.19
#### Environment variables
@@ -59,171 +55,172 @@
| ----------------------- | ---------------------- |
| CONDA | /usr/local/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
| VCPKG_ROOT | /usr/local/share/vcpkg |
### Project Management
- Apache Ant 1.10.13
- Apache Maven 3.9.0
- Gradle 8.0.1
- Sbt 1.8.2
- Apache Ant(TM) 1.10.12
- Apache Maven 3.8.6
- Gradle 7.5.1
- Sbt 1.7.1
### Utilities
- 7-Zip 17.04
- aria2 1.36.0
- azcopy 10.17.0
- bazel 6.0.0
- bazelisk 1.16.0
- azcopy 10.16.0
- bazel 5.3.1
- bazelisk 1.14.0
- bsdtar 3.3.2 - available by 'tar' alias
- Curl 7.88.1
- Git 2.39.2
- Git LFS 3.3.0
- GitHub CLI 2.23.0
- Curl 7.85.0
- Git 2.37.3
- Git LFS: 3.2.0
- GitHub CLI: 2.16.0
- GNU Tar 1.34 - available by 'gtar' alias
- GNU Wget 1.21.3
- gpg (GnuPG) 2.4.0
- helm v3.11.1+g293b50c
- Hub CLI 2.14.2
- ImageMagick 7.1.0-62
- gpg (GnuPG) 2.3.7
- helm v3.10.0+gce66412
- Hub CLI: 2.14.2
- ImageMagick 7.1.0-49
- jq 1.6
- mongo 5.0.14
- mongod 5.0.14
- mongo v5.0.11
- mongod v5.0.11
- Newman 5.3.2
- OpenSSL 1.1.1t 7 Feb 2023
- Packer 1.8.6
- PostgreSQL 14.7 (Homebrew)
- psql (PostgreSQL) 14.7 (Homebrew)
- OpenSSL 1.1.1q 5 Jul 2022 `(/usr/local/opt/openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1q)`
- Packer 1.8.3
- PostgreSQL 14.5 (Homebrew)
- psql (PostgreSQL) 14.5 (Homebrew)
- Sox 14.4.2
- Subversion (SVN) 1.14.2
- Switchaudio-osx 1.1.0
- yq 4.31.1
- zstd 1.5.4
- yq (https://github.com/mikefarah/yq/) version 4.27.5
- zstd 1.5.2
### Tools
- Aliyun CLI 3.0.150
- App Center CLI 2.13.2
- AWS CLI 2.10.2
- AWS SAM CLI 1.73.0
- AWS Session Manager CLI 1.2.398.0
- Azure CLI 2.45.0
- Azure CLI (azure-devops) 0.26.0
- Bicep CLI 0.14.85
- Aliyun CLI 3.0.127
- App Center CLI 2.11.0
- AWS CLI 2.7.35
- AWS SAM CLI 1.57.0
- AWS Session Manager CLI 1.2.339.0
- Azure CLI (azure-devops) 0.25.0
- Azure CLI 2.40.0
- Bicep CLI 0.10.61
- Cabal 3.6.2.0
- Cmake 3.25.2
- CodeQL Action Bundles 2.12.1 2.12.2
- Colima 0.5.2
- Fastlane 2.212.0
- GHC 9.4.4
- GHCup 0.1.19.1
- Cmake 3.24.2
- CodeQL Action Bundle 2.10.5
- Fastlane 2.210.1
- GHC 9.4.2
- GHCup 0.1.18.0
- Jazzy 0.14.3
- Stack 2.9.1
- SwiftFormat 0.50.9
- Swig 4.1.1
- SwiftFormat 0.49.18
- Swig 4.0.2
- Xcode Command Line Tools 13.2.0.0.1.1638488800
### Linters
- SwiftLint 0.48.0
- Yamllint 1.29.0
- yamllint 1.28.0
### Browsers
- Safari 16.3.1 (16614.4.6.11.7)
- SafariDriver 16.3.1 (16614.4.6.11.7)
- Google Chrome 110.0.5481.177
- ChromeDriver 110.0.5481.77
- Microsoft Edge 110.0.1587.50
- Microsoft Edge WebDriver 110.0.1587.50
- Mozilla Firefox 110.0
- geckodriver 0.32.2
- Selenium server 4.8.0
- Safari 16.0 (16614.1.25.9.10)
- SafariDriver 16.0 (16614.1.25.9.10)
- Google Chrome 105.0.5195.125
- ChromeDriver 105.0.5195.52
- Microsoft Edge 105.0.1343.50
- Microsoft Edge WebDriver 105.0.1343.50
- Mozilla Firefox 105.0.1
- geckodriver 0.31.0
- Selenium server 4.4.0
#### Environment variables
| Name | Value |
| --------------- | ---------------------------------------------- |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/110.0.5481.77 |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/105.0.5195.52 |
| EDGEWEBDRIVER | /usr/local/share/edge_driver |
| GECKOWEBDRIVER | /usr/local/opt/geckodriver/bin |
### Java
| Version | Vendor | Environment Variable |
| ------------------- | --------------- | -------------------- |
| 8.0.362+9 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.18+10 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.6+10 | Eclipse Temurin | JAVA_HOME_17_X64 |
| 8.0.345+1 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.16+101 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.4+101 | Eclipse Temurin | JAVA_HOME_17_X64 |
### GraalVM
| Version | Environment variables |
| --------- | --------------------- |
| CE 22.3.1 | GRAALVM_11_ROOT |
| CE 22.2.0 | GRAALVM_11_ROOT |
### Cached Tools
#### Ruby
- 2.4.10
- 2.5.9
- 2.6.10
- 2.7.7
- 3.0.5
- 3.1.3
- 2.7.6
- 3.0.4
- 3.1.2
#### Python
- 3.7.15
- 3.8.16
- 3.9.16
- 3.10.10
- 3.11.2
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.7
#### PyPy
- 2.7.18 [PyPy 7.3.11]
- 2.7.18 [PyPy 7.3.9]
- 3.7.13 [PyPy 7.3.9]
- 3.8.16 [PyPy 7.3.11]
- 3.9.16 [PyPy 7.3.11]
- 3.8.13 [PyPy 7.3.9]
- 3.9.12 [PyPy 7.3.9]
#### Node.js
- 14.21.3
- 16.19.1
- 18.14.2
- 12.22.12
- 14.20.1
- 16.17.1
#### Go
- 1.17.13
- 1.18.10
- 1.19.6
| Version | Architecture | Environment Variable |
| ------- | ------------ | -------------------- |
| 1.17.13 (Default) | x64 | GOROOT_1_17_X64 |
| 1.18.6 | x64 | GOROOT_1_18_X64 |
| 1.19.1 | x64 | GOROOT_1_19_X64 |
### Rust Tools
- Cargo 1.67.1
- Rust 1.67.1
- Rustdoc 1.67.1
- Rustup 1.25.2
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.64.0
- Cargo-audit 0.17.4
- Cargo-outdated 0.11.2
- Bindgen 0.60.1
- Cargo-audit 0.17.0
- Cargo-outdated 0.11.1
- Cbindgen 0.24.3
- Clippy 0.1.67
- Clippy 0.1.64
- Rustfmt 1.5.1-stable
### PowerShell Tools
- PowerShell 7.2.9
- PowerShell 7.2.6
#### PowerShell Modules
- Az: 9.4.0
- MarkdownPS: 1.9
- Pester: 5.4.0
- PSScriptAnalyzer: 1.21.0
| Module | Version |
| ---------------- | ------- |
| Az | 8.3.0 |
| MarkdownPS | 1.9 |
| Pester | 5.3.3 |
| PSScriptAnalyzer | 1.20.0 |
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
| ----- | ------- | ------------------------------- | ------------- | ---------- |
| httpd | 2.4.55 | /usr/local/etc/httpd/httpd.conf | none | 80 |
| nginx | 1.23.3 | /usr/local/etc/nginx/nginx.conf | none | 80 |
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
| ----- | -------- | ------------------------------- | ------------- | ---------- |
| httpd | 2.4.54_1 | /usr/local/etc/httpd/httpd.conf | none | 80 |
| nginx | 1.23.1 | /usr/local/etc/nginx/nginx.conf | none | 80 |
### Xamarin
#### Visual Studio for Mac
| Version | Build | Path |
| -------------- | ----------- | ------------------------------------ |
| 2019 | 8.10.25.2 | /Applications/Visual Studio 2019.app |
| 2022 (default) | 17.5.0.1802 | /Applications/Visual Studio.app |
| Version | Build | Path |
| -------------- | --------- | ------------------------------------ |
| 2019 | 8.10.25.2 | /Applications/Visual Studio 2019.app |
| 2022 (default) | 17.3.5.0 | /Applications/Visual Studio.app |
##### Notes
##### Notes:
```
To use Visual Studio 2019 by default rename the app:
mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app"
@@ -334,33 +331,35 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
| watchOS 8.3 | 13.2.1 | Apple Watch Series 4 - 40mm<br>Apple Watch Series 4 - 44mm<br>Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm |
### Android
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 8.0 |
| Android Emulator | 32.1.11 |
| Android SDK Build-tools | 33.0.0 33.0.1 33.0.2<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platforms | android-33-ext4 (rev 1)<br>android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Platform-Tools | 34.0.0 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default) |
| SDK Patch Applier v4 | 1 |
| Package Name | Version |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.11 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Platform-Tools | 33.0.3 |
| Android Support Repository | 47.0.0 |
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.1.8937393 (default) |
| SDK Patch Applier v4 | 1 |
#### Environment variables
| Name | Value |
| ----------------------- | -------------------------------------------------- |
| ANDROID_HOME | /Users/runner/Library/Android/sdk |
| ANDROID_NDK | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_HOME | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_LATEST_HOME | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_ROOT | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_HOME | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_LATEST_HOME | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_ROOT | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_SDK_ROOT | /Users/runner/Library/Android/sdk |
### Miscellaneous
- libXext 1.3.5
- libXft 2.3.7
- Tcl/Tk 8.6.13
- Zlib 1.2.13
- libXext 1.3.4
- libXft 2.3.6
- Tcl/Tk 8.6.12_1
- Zlib 1.2.12_1
+222 -230
View File
@@ -1,53 +1,49 @@
| Announcements |
|-|
| [GCC-9 will be removed from macOS 11 on March, 6](https://github.com/actions/runner-images/issues/7136) |
| [Xcode 13.4 will be pointing to 13.4.1 on February, 28](https://github.com/actions/runner-images/issues/7127) |
| [[macOS] Default Xcode on macOS 12 Monterey will be set to Xcode 14.0.1 on October, 3](https://github.com/actions/runner-images/issues/6225) |
| [The macOS 10.15 Actions runner image will begin deprecation on 5/31/22 and will be fully unsupported by 12/1/22 for GitHub and ADO](https://github.com/actions/runner-images/issues/5583) |
***
# macOS 12
- OS Version: macOS 12.6.3 (21G419)
# macOS 12.6 info
- System Version: macOS 12.6 (21G115)
- Kernel Version: Darwin 21.6.0
- Image Version: 20230219.1
- Image Version: 20220929.2
## Installed Software
### Language and Runtime
- .NET Core SDK: 3.1.101, 3.1.201, 3.1.302, 3.1.426, 6.0.406, 7.0.102, 7.0.200
- .NET SDK 3.1.101 3.1.201 3.1.302 3.1.423 5.0.102 5.0.202 5.0.302 5.0.408 6.0.401
- Bash 3.2.57(1)-release
- Clang/LLVM 14.0.0
- Clang/LLVM (Homebrew) 15.0.7 - available on `$(brew --prefix llvm@15)/bin/clang`
- GCC 11 (Homebrew GCC 11.3.0) - available by `gcc-11` alias
- GCC 12 (Homebrew GCC 12.2.0) - available by `gcc-12` alias
- GNU Fortran 11 (Homebrew GCC 11.3.0) - available by `gfortran-11` alias
- GNU Fortran 12 (Homebrew GCC 12.2.0) - available by `gfortran-12` alias
- Clang/LLVM 14.0.0 is default
- Clang/LLVM 14.0.6 is available on `'$(brew --prefix llvm@14)/bin/clang'`
- gcc-11 (Homebrew GCC 11.3.0) 11.3.0 - available by `gcc-11` alias
- GNU Fortran (Homebrew GCC 11.3.0) 11.3.0 - available by `gfortran-11` alias
- Go 1.17.13
- Julia 1.8.5
- Kotlin 1.8.10-release-430
- Mono 6.12.0.188
- MSBuild 16.10.1.51301 (Mono 6.12.0.188)
- Node.js 18.14.1
- NVM 0.39.3
- NVM - Cached node versions: 14.21.3, 16.19.1, 18.14.1
- Perl 5.36.0
- PHP 8.2.3
- julia 1.8.1
- Kotlin 1.7.10-release-333
- MSBuild 16.10.1.31401 (from /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/15.0/bin/MSBuild.dll)
- Node.js v16.17.1
- NVM 0.39.1
- NVM - Cached node versions: v12.22.12 v14.20.1 v16.17.1
- Perl 5.34.0
- PHP 8.1.11
- Python 2.7.18
- Python3 3.11.2
- R 4.2.2
- Ruby 3.0.5p211
- Python 3.10.6
- R 4.2.1
- Ruby 3.0.4p208
### Package Management
- Bundler 2.4.7
- Carthage 0.39.0
- Bundler version 2.3.22
- Carthage 0.38.0
- CocoaPods 1.11.3
- Composer 2.5.4
- Homebrew 4.0.1
- Miniconda 23.1.0
- NPM 9.3.1
- NuGet 6.3.1.1
- Composer 2.4.2
- Homebrew 3.6.3
- Miniconda 4.12.0
- NPM 8.15.0
- NuGet 6.2.1.2
- Pip 20.3.4 (python 2.7)
- Pip3 23.0.1 (python 3.11)
- Pip 22.2.2 (python 3.10)
- Pipx 1.1.0
- RubyGems 3.4.7
- Vcpkg 2023 (build from commit a32522820)
- RubyGems 3.3.22
- Vcpkg 2022 (build from master \<2f0a16b5a>)
- Yarn 1.22.19
#### Environment variables
@@ -55,167 +51,169 @@
| ----------------------- | ---------------------- |
| CONDA | /usr/local/miniconda |
| VCPKG_INSTALLATION_ROOT | /usr/local/share/vcpkg |
| VCPKG_ROOT | /usr/local/share/vcpkg |
### Project Management
- Apache Ant 1.10.13
- Apache Maven 3.9.0
- Gradle 8.0
- Sbt 1.8.2
- Apache Ant(TM) 1.10.12
- Apache Maven 3.8.6
- Gradle 7.5.1
- Sbt 1.7.1
### Utilities
- 7-Zip 17.04
- aria2 1.36.0
- azcopy 10.17.0
- bazel 6.0.0
- bazelisk 1.16.0
- azcopy 10.16.0
- bazel 5.3.1
- bazelisk 1.14.0
- bsdtar 3.5.1 - available by 'tar' alias
- Curl 7.88.0
- Git 2.39.2
- Git LFS 3.3.0
- GitHub CLI 2.23.0
- Curl 7.85.0
- Git 2.37.3
- Git LFS: 3.2.0
- GitHub CLI: 2.16.1
- GNU Tar 1.34 - available by 'gtar' alias
- GNU Wget 1.21.3
- gpg (GnuPG) 2.4.0
- Hub CLI 2.14.2
- ImageMagick 7.1.0-62
- gpg (GnuPG) 2.3.7
- Hub CLI: 2.14.2
- ImageMagick 7.1.0-49
- jq 1.6
- mongo 5.0.14
- mongod 5.0.14
- OpenSSL 1.1.1t 7 Feb 2023
- Packer 1.8.6
- PostgreSQL 14.7 (Homebrew)
- psql (PostgreSQL) 14.7 (Homebrew)
- mongo v5.0.11
- mongod v5.0.11
- OpenSSL 1.1.1q 5 Jul 2022 `(/usr/local/opt/openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1q)`
- Packer 1.8.3
- PostgreSQL 14.5 (Homebrew)
- psql (PostgreSQL) 14.5 (Homebrew)
- Sox 14.4.2
- Subversion (SVN) 1.14.2
- Switchaudio-osx 1.1.0
- Vagrant 2.3.4
- Vagrant 2.3.0
- VirtualBox 6.1.38r153438
- yq 4.30.8
- zstd 1.5.4
- yq (https://github.com/mikefarah/yq/) version 4.27.5
- zstd 1.5.2
### Tools
- App Center CLI 2.13.2
- AWS CLI 2.10.1
- AWS SAM CLI 1.73.0
- AWS Session Manager CLI 1.2.398.0
- Azure CLI 2.45.0
- Azure CLI (azure-devops) 0.26.0
- Bicep CLI 0.14.46
- App Center CLI 2.11.0
- AWS CLI 2.7.35
- AWS SAM CLI 1.58.0
- AWS Session Manager CLI 1.2.339.0
- Azure CLI (azure-devops) 0.25.0
- Azure CLI 2.40.0
- Bicep CLI 0.10.61
- Cabal 3.6.2.0
- Cmake 3.25.2
- CodeQL Action Bundles 2.12.1 2.12.2
- Colima 0.5.2
- Fastlane 2.211.0
- GHC 9.4.4
- GHCup 0.1.19.0
- Cmake 3.24.2
- CodeQL Action Bundle 2.11.0
- Colima 0.4.5
- Fastlane 2.210.1
- GHC 9.4.2
- GHCup 0.1.18.0
- Jazzy 0.14.3
- Stack 2.9.1
- SwiftFormat 0.50.9
- Swig 4.1.1
- Xcode Command Line Tools 14.2.0.0.1.1668646533
- SwiftFormat 0.50.0
- Swig 4.0.2
- Xcode Command Line Tools 14.0.0.0.1.1661618636
### Linters
- SwiftLint 0.50.3
- Yamllint 1.29.0
- SwiftLint 0.49.1
- yamllint 1.28.0
### Browsers
- Safari 16.3 (17614.4.6.11.6)
- SafariDriver 16.3 (17614.4.6.11.6)
- Google Chrome 110.0.5481.100
- ChromeDriver 110.0.5481.77
- Microsoft Edge 110.0.1587.50
- Microsoft Edge WebDriver 110.0.1587.50
- Mozilla Firefox 110.0
- geckodriver 0.32.2
- Selenium server 4.8.0
- Safari 16.0 (17614.1.25.9.10)
- SafariDriver 16.0 (17614.1.25.9.10)
- Google Chrome 106.0.5249.61
- ChromeDriver 106.0.5249.61
- Microsoft Edge 105.0.1343.53
- Microsoft Edge WebDriver 105.0.1343.53
- Mozilla Firefox 105.0.1
- geckodriver 0.31.0
- Selenium server 4.5.0
#### Environment variables
| Name | Value |
| --------------- | ---------------------------------------------- |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/110.0.5481.77 |
| CHROMEWEBDRIVER | /usr/local/Caskroom/chromedriver/106.0.5249.61 |
| EDGEWEBDRIVER | /usr/local/share/edge_driver |
| GECKOWEBDRIVER | /usr/local/opt/geckodriver/bin |
### Java
| Version | Vendor | Environment Variable |
| ------------------- | --------------- | -------------------- |
| 8.0.362+9 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.18+10 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.6+10 | Eclipse Temurin | JAVA_HOME_17_X64 |
| 8.0.345+1 (default) | Eclipse Temurin | JAVA_HOME_8_X64 |
| 11.0.16+101 | Eclipse Temurin | JAVA_HOME_11_X64 |
| 17.0.4+101 | Eclipse Temurin | JAVA_HOME_17_X64 |
### GraalVM
| Version | Environment variables |
| --------- | --------------------- |
| CE 22.3.1 | GRAALVM_11_ROOT |
| CE 22.2.0 | GRAALVM_11_ROOT |
### Cached Tools
#### Ruby
- 2.7.7
- 3.0.5
- 3.1.3
- 2.7.6
- 3.0.4
- 3.1.2
#### Python
- 3.7.15
- 3.8.16
- 3.9.16
- 3.10.10
- 3.11.2
- 3.7.14
- 3.8.14
- 3.9.14
- 3.10.7
#### PyPy
- 2.7.18 [PyPy 7.3.11]
- 2.7.18 [PyPy 7.3.9]
- 3.7.13 [PyPy 7.3.9]
- 3.8.16 [PyPy 7.3.11]
- 3.9.16 [PyPy 7.3.11]
- 3.8.13 [PyPy 7.3.9]
- 3.9.12 [PyPy 7.3.9]
#### Node.js
- 14.21.3
- 16.19.1
- 18.14.1
- 12.22.12
- 14.20.1
- 16.17.1
#### Go
- 1.17.13
- 1.18.10
- 1.19.6
| Version | Architecture | Environment Variable |
| ------- | ------------ | -------------------- |
| 1.17.13 (Default) | x64 | GOROOT_1_17_X64 |
| 1.18.6 | x64 | GOROOT_1_18_X64 |
| 1.19.1 | x64 | GOROOT_1_19_X64 |
### Rust Tools
- Cargo 1.67.1
- Rust 1.67.1
- Rustdoc 1.67.1
- Rustup 1.25.2
- Cargo 1.64.0
- Rust 1.64.0
- Rustdoc 1.64.0
- Rustup 1.25.1
#### Packages
- Bindgen 0.64.0
- Cargo-audit 0.17.4
- Cargo-outdated 0.11.2
- Bindgen 0.60.1
- Cargo-audit 0.17.0
- Cargo-outdated 0.11.1
- Cbindgen 0.24.3
- Clippy 0.1.67
- Clippy 0.1.64
- Rustfmt 1.5.1-stable
### PowerShell Tools
- PowerShell 7.2.9
- PowerShell 7.2.6
#### PowerShell Modules
- Az: 9.4.0
- MarkdownPS: 1.9
- Pester: 5.4.0
- PSScriptAnalyzer: 1.21.0
| Module | Version |
| ---------------- | ------- |
| Az | 8.3.0 |
| MarkdownPS | 1.9 |
| Pester | 5.3.3 |
| PSScriptAnalyzer | 1.21.0 |
### Web Servers
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
| ----- | ------- | ------------------------------- | ------------- | ---------- |
| httpd | 2.4.55 | /usr/local/etc/httpd/httpd.conf | none | 80 |
| nginx | 1.23.3 | /usr/local/etc/nginx/nginx.conf | none | 80 |
| Name | Version | ConfigFile | ServiceStatus | ListenPort |
| ----- | -------- | ------------------------------- | ------------- | ---------- |
| httpd | 2.4.54_1 | /usr/local/etc/httpd/httpd.conf | none | 80 |
| nginx | 1.23.1 | /usr/local/etc/nginx/nginx.conf | none | 80 |
### Xamarin
#### Visual Studio for Mac
| Version | Build | Path |
| -------------- | --------- | ------------------------------------ |
| 2019 | 8.10.25.2 | /Applications/Visual Studio 2019.app |
| 2022 (default) | 17.4.5.8 | /Applications/Visual Studio.app |
| 2022 (default) | 17.3.6.20 | /Applications/Visual Studio.app |
##### Notes
##### Notes:
```
To use Visual Studio 2019 by default rename the app:
mv "/Applications/Visual Studio.app" "/Applications/Visual Studio 2022.app"
@@ -225,10 +223,7 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
#### Xamarin bundles
| symlink | Xamarin.Mono | Xamarin.iOS | Xamarin.Mac | Xamarin.Android |
| ----------------- | ------------ | ----------- | ----------- | --------------- |
| 6_12_23 | 6.12 | 16.2 | 9.1 | 13.1 |
| 6_12_22 | 6.12 | 16.1 | 9.0 | 13.1 |
| 6_12_21 (default) | 6.12 | 16.0 | 8.12 | 13.1 |
| 6_12_20 | 6.12 | 16.0 | 8.12 | 13.0 |
| 6_12_20 (default) | 6.12 | 16.0 | 8.12 | 13.0 |
| 6_12_19 | 6.12 | 15.12 | 8.12 | 13.0 |
| 6_12_18 | 6.12 | 15.10 | 8.10 | 12.3 |
| 6_12_17 | 6.12 | 15.10 | 8.10 | 12.2 |
@@ -244,129 +239,126 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
- NUnit 3.6.1
### Xcode
| Version | Build | Path |
| -------------- | -------- | ------------------------------ |
| 14.2 (default) | 14C18 | /Applications/Xcode_14.2.app |
| 14.1 | 14B47b | /Applications/Xcode_14.1.app |
| 14.0.1 | 14A400 | /Applications/Xcode_14.0.1.app |
| 13.4.1 | 13F100 | /Applications/Xcode_13.4.1.app |
| 13.4 | 13F17a | /Applications/Xcode_13.4.app |
| 13.3.1 | 13E500a | /Applications/Xcode_13.3.1.app |
| 13.2.1 | 13C100 | /Applications/Xcode_13.2.1.app |
| 13.1 | 13A1030d | /Applications/Xcode_13.1.app |
| Version | Build | Path |
| ---------------- | -------- | ------------------------------ |
| 14.1 (beta) | 14B5033e | /Applications/Xcode_14.1.app |
| 14.0.1 (default) | 14A400 | /Applications/Xcode_14.0.1.app |
| 14.0 | 14A309 | /Applications/Xcode_14.0.app |
| 13.4.1 | 13F100 | /Applications/Xcode_13.4.1.app |
| 13.4 | 13F17a | /Applications/Xcode_13.4.app |
| 13.3.1 | 13E500a | /Applications/Xcode_13.3.1.app |
| 13.2.1 | 13C100 | /Applications/Xcode_13.2.1.app |
| 13.1 | 13A1030d | /Applications/Xcode_13.1.app |
#### Xcode Support Tools
- xcpretty 0.3.0
- xcversion 2.8.1
#### Installed SDKs
| SDK | SDK Name | Xcode Version |
| ----------------------- | -------------------- | ---------------------------- |
| macOS 12.0 | macosx12.0 | 13.1 |
| macOS 12.1 | macosx12.1 | 13.2.1 |
| macOS 12.3 | macosx12.3 | 13.3.1, 13.4, 13.4.1, 14.0.1 |
| macOS 13.0 | macosx13.0 | 14.1 |
| macOS 13.1 | macosx13.1 | 14.2 |
| iOS 15.0 | iphoneos15.0 | 13.1 |
| iOS 15.2 | iphoneos15.2 | 13.2.1 |
| iOS 15.4 | iphoneos15.4 | 13.3.1 |
| iOS 15.5 | iphoneos15.5 | 13.4, 13.4.1 |
| iOS 16.0 | iphoneos16.0 | 14.0.1 |
| iOS 16.1 | iphoneos16.1 | 14.1 |
| iOS 16.2 | iphoneos16.2 | 14.2 |
| Simulator - iOS 15.0 | iphonesimulator15.0 | 13.1 |
| Simulator - iOS 15.2 | iphonesimulator15.2 | 13.2.1 |
| Simulator - iOS 15.4 | iphonesimulator15.4 | 13.3.1 |
| Simulator - iOS 15.5 | iphonesimulator15.5 | 13.4, 13.4.1 |
| Simulator - iOS 16.0 | iphonesimulator16.0 | 14.0.1 |
| Simulator - iOS 16.1 | iphonesimulator16.1 | 14.1 |
| Simulator - iOS 16.2 | iphonesimulator16.2 | 14.2 |
| tvOS 15.0 | appletvos15.0 | 13.1 |
| tvOS 15.2 | appletvos15.2 | 13.2.1 |
| tvOS 15.4 | appletvos15.4 | 13.3.1, 13.4, 13.4.1 |
| tvOS 16.0 | appletvos16.0 | 14.0.1 |
| tvOS 16.1 | appletvos16.1 | 14.1, 14.2 |
| Simulator - tvOS 15.0 | appletvsimulator15.0 | 13.1 |
| Simulator - tvOS 15.2 | appletvsimulator15.2 | 13.2.1 |
| Simulator - tvOS 15.4 | appletvsimulator15.4 | 13.3.1, 13.4, 13.4.1 |
| Simulator - tvOS 16.0 | appletvsimulator16.0 | 14.0.1 |
| Simulator - tvOS 16.1 | appletvsimulator16.1 | 14.1, 14.2 |
| watchOS 8.0 | watchos8.0 | 13.1 |
| watchOS 8.3 | watchos8.3 | 13.2.1 |
| watchOS 8.5 | watchos8.5 | 13.3.1, 13.4, 13.4.1 |
| watchOS 9.0 | watchos9.0 | 14.0.1 |
| watchOS 9.1 | watchos9.1 | 14.1, 14.2 |
| Simulator - watchOS 8.0 | watchsimulator8.0 | 13.1 |
| Simulator - watchOS 8.3 | watchsimulator8.3 | 13.2.1 |
| Simulator - watchOS 8.5 | watchsimulator8.5 | 13.3.1, 13.4, 13.4.1 |
| Simulator - watchOS 9.0 | watchsimulator9.0 | 14.0.1 |
| Simulator - watchOS 9.1 | watchsimulator9.1 | 14.1, 14.2 |
| DriverKit 21.0.1 | driverkit21.0.1 | 13.1 |
| DriverKit 21.2 | driverkit21.2 | 13.2.1 |
| DriverKit 21.4 | driverkit21.4 | 13.3.1, 13.4, 13.4.1, 14.0.1 |
| DriverKit 22.1 | driverkit22.1 | 14.1 |
| DriverKit 22.2 | driverkit22.2 | 14.2 |
| SDK | SDK Name | Xcode Version |
| ----------------------- | -------------------- | ---------------------------------- |
| macOS 12.0 | macosx12.0 | 13.1 |
| macOS 12.1 | macosx12.1 | 13.2.1 |
| macOS 12.3 | macosx12.3 | 13.3.1, 13.4, 13.4.1, 14.0, 14.0.1 |
| macOS 13.0 | macosx13.0 | 14.1 |
| iOS 15.0 | iphoneos15.0 | 13.1 |
| iOS 15.2 | iphoneos15.2 | 13.2.1 |
| iOS 15.4 | iphoneos15.4 | 13.3.1 |
| iOS 15.5 | iphoneos15.5 | 13.4, 13.4.1 |
| iOS 16.0 | iphoneos16.0 | 14.0, 14.0.1 |
| iOS 16.1 | iphoneos16.1 | 14.1 |
| Simulator - iOS 15.0 | iphonesimulator15.0 | 13.1 |
| Simulator - iOS 15.2 | iphonesimulator15.2 | 13.2.1 |
| Simulator - iOS 15.4 | iphonesimulator15.4 | 13.3.1 |
| Simulator - iOS 15.5 | iphonesimulator15.5 | 13.4, 13.4.1 |
| Simulator - iOS 16.0 | iphonesimulator16.0 | 14.0, 14.0.1 |
| Simulator - iOS 16.1 | iphonesimulator16.1 | 14.1 |
| tvOS 15.0 | appletvos15.0 | 13.1 |
| tvOS 15.2 | appletvos15.2 | 13.2.1 |
| tvOS 15.4 | appletvos15.4 | 13.3.1, 13.4, 13.4.1 |
| tvOS 16.0 | appletvos16.0 | 14.0, 14.0.1 |
| tvOS 16.1 | appletvos16.1 | 14.1 |
| Simulator - tvOS 15.0 | appletvsimulator15.0 | 13.1 |
| Simulator - tvOS 15.2 | appletvsimulator15.2 | 13.2.1 |
| Simulator - tvOS 15.4 | appletvsimulator15.4 | 13.3.1, 13.4, 13.4.1 |
| Simulator - tvOS 16.0 | appletvsimulator16.0 | 14.0, 14.0.1 |
| Simulator - tvOS 16.1 | appletvsimulator16.1 | 14.1 |
| watchOS 8.0 | watchos8.0 | 13.1 |
| watchOS 8.3 | watchos8.3 | 13.2.1 |
| watchOS 8.5 | watchos8.5 | 13.3.1, 13.4, 13.4.1 |
| watchOS 9.0 | watchos9.0 | 14.0, 14.0.1 |
| watchOS 9.1 | watchos9.1 | 14.1 |
| Simulator - watchOS 8.0 | watchsimulator8.0 | 13.1 |
| Simulator - watchOS 8.3 | watchsimulator8.3 | 13.2.1 |
| Simulator - watchOS 8.5 | watchsimulator8.5 | 13.3.1, 13.4, 13.4.1 |
| Simulator - watchOS 9.0 | watchsimulator9.0 | 14.0, 14.0.1 |
| Simulator - watchOS 9.1 | watchsimulator9.1 | 14.1 |
| DriverKit 21.0.1 | driverkit21.0.1 | 13.1 |
| DriverKit 21.2 | driverkit21.2 | 13.2.1 |
| DriverKit 21.4 | driverkit21.4 | 13.3.1, 13.4, 13.4.1, 14.0, 14.0.1 |
| DriverKit 22.1 | driverkit22.1 | 14.1 |
#### Installed Simulators
| OS | Xcode Version | Simulators |
| ----------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| iOS 15.0 | 13.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.2 | 13.2.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.4 | 13.3.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.5 | 13.4<br>13.4.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 16.0 | 14.0.1 | iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 14<br>iPhone 14 Plus<br>iPhone 14 Pro<br>iPhone 14 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 16.1 | 14.1 | iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 14<br>iPhone 14 Plus<br>iPhone 14 Pro<br>iPhone 14 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (10th generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (11-inch) (4th generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (12.9-inch) (6th generation)<br>iPad Pro (9.7-inch) |
| iOS 16.2 | 14.2 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 14<br>iPhone 14 Plus<br>iPhone 14 Pro<br>iPhone 14 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (10th generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (11-inch) (4th generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (12.9-inch) (6th generation)<br>iPad Pro (9.7-inch) |
| tvOS 15.0 | 13.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (2nd generation) (at 1080p) |
| tvOS 15.2 | 13.2.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 15.4 | 13.3.1<br>13.4<br>13.4.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 16.0 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0.1<br>14.1<br>14.2 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 16.1 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0.1<br>14.1<br>14.2 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (3rd generation)<br>Apple TV 4K (3rd generation) (at 1080p)<br>Apple TV 4K (at 1080p) (2nd generation) |
| watchOS 8.0 | 13.1 | Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm |
| watchOS 8.3 | 13.2.1 | Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm |
| watchOS 8.5 | 13.3.1<br>13.4<br>13.4.1 | Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm |
| watchOS 9.0 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0.1<br>14.1<br>14.2 | Apple Watch SE - 40mm (2nd generation)<br>Apple Watch SE - 44mm (2nd generation)<br>Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm<br>Apple Watch Series 8 - 41mm<br>Apple Watch Series 8 - 45mm<br>Apple Watch Ultra - 49mm |
| watchOS 9.1 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0.1<br>14.1<br>14.2 | Apple Watch SE - 40mm (2nd generation)<br>Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 - 45mm<br>Apple Watch Series 8 - 41mm<br>Apple Watch Series 8 - 45mm<br>Apple Watch Ultra - 49mm |
| OS | Xcode Version | Simulators |
| ----------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| iOS 15.0 | 13.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.2 | 13.2.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.4 | 13.3.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 15.5 | 13.4<br>13.4.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 16.0 | 14.0<br>14.0.1 | iPod touch (7th generation)<br>iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 14<br>iPhone 14 Plus<br>iPhone 14 Pro<br>iPhone 14 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| iOS 16.1 | 14.1 | iPhone 11<br>iPhone 11 Pro<br>iPhone 11 Pro Max<br>iPhone 12<br>iPhone 12 mini<br>iPhone 12 Pro<br>iPhone 12 Pro Max<br>iPhone 13<br>iPhone 13 mini<br>iPhone 13 Pro<br>iPhone 13 Pro Max<br>iPhone 14<br>iPhone 14 Plus<br>iPhone 14 Pro<br>iPhone 14 Pro Max<br>iPhone 8<br>iPhone 8 Plus<br>iPhone SE (2nd generation)<br>iPhone SE (3rd generation)<br>iPad (9th generation)<br>iPad Air (4th generation)<br>iPad Air (5th generation)<br>iPad mini (6th generation)<br>iPad Pro (11-inch) (3rd generation)<br>iPad Pro (12.9-inch) (5th generation)<br>iPad Pro (9.7-inch) |
| tvOS 15.0 | 13.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 15.2 | 13.2.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 15.4 | 13.3.1<br>13.4<br>13.4.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 16.0 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0<br>14.0.1<br>14.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| tvOS 16.1 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0<br>14.0.1<br>14.1 | Apple TV<br>Apple TV 4K (2nd generation)<br>Apple TV 4K (at 1080p) (2nd generation) |
| watchOS 8.0 | 13.1 | Apple Watch Series 5 - 44mm<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 45mm<br>Apple Watch Series 7 (41mm) |
| watchOS 8.3 | 13.2.1 | Apple Watch Series 5 - 44mm<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 (45mm) |
| watchOS 8.5 | 13.3.1<br>13.4<br>13.4.1 | Apple Watch Series 5 - 40mm<br>Apple Watch Series 5 - 44mm<br>Apple Watch Series 6 - 40mm<br>Apple Watch Series 6 - 44mm<br>Apple Watch Series 7 - 41mm<br>Apple Watch Series 7 (45mm) |
| watchOS 9.0 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0<br>14.0.1<br>14.1 | Apple Watch SE (44mm) (2nd generation)<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 5 (44mm)<br>Apple Watch Series 6 (40mm)<br>Apple Watch Series 6 (44mm)<br>Apple Watch Series 7 (41mm)<br>Apple Watch Series 7 (45mm)<br>Apple Watch Series 8 (41mm)<br>Apple Watch Series 8 (45mm)<br>Apple Watch Ultra (49mm) |
| watchOS 9.1 | 13.1<br>13.2.1<br>13.3.1<br>13.4<br>13.4.1<br>14.0<br>14.0.1<br>14.1 | Apple Watch SE (40mm) (2nd generation)<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 5 (44mm)<br>Apple Watch Series 6 (40mm)<br>Apple Watch Series 6 (44mm)<br>Apple Watch Series 7 (41mm)<br>Apple Watch Series 7 (45mm)<br>Apple Watch Series 8 (41mm)<br>Apple Watch Series 8 (45mm)<br>Apple Watch Ultra (49mm) |
### Android
| Package Name | Version |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 8.0 |
| Android Emulator | 32.1.11 |
| Android SDK Build-tools | 33.0.0 33.0.1 33.0.2<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platforms | android-33-ext4 (rev 1)<br>android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Platform-Tools | 34.0.0 |
| Android Support Repository | 47.0.0 |
| CMake | 3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default) |
| SDK Patch Applier v4 | 1 |
| Package Name | Version |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Android Command Line Tools | 7.0 |
| Android Emulator | 31.3.11 |
| Android SDK Build-tools | 33.0.0<br>32.0.0<br>31.0.0<br>30.0.0 30.0.1 30.0.2 30.0.3<br>29.0.0 29.0.1 29.0.2 29.0.3<br>28.0.0 28.0.1 28.0.2 28.0.3<br>27.0.0 27.0.1 27.0.2 27.0.3 |
| Android SDK Platforms | android-33 (rev 2)<br>android-32 (rev 1)<br>android-31 (rev 1)<br>android-30 (rev 3)<br>android-29 (rev 5)<br>android-28 (rev 6)<br>android-27 (rev 3) |
| Android SDK Platform-Tools | 33.0.3 |
| Android Support Repository | 47.0.0 |
| CMake | 3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.1.8937393 (default) |
| SDK Patch Applier v4 | 1 |
#### Environment variables
| Name | Value |
| ----------------------- | -------------------------------------------------- |
| ANDROID_HOME | /Users/runner/Library/Android/sdk |
| ANDROID_NDK | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_HOME | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_LATEST_HOME | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK_ROOT | /Users/runner/Library/Android/sdk/ndk/25.2.9519653 |
| ANDROID_NDK | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_HOME | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_LATEST_HOME | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_NDK_ROOT | /Users/runner/Library/Android/sdk/ndk/25.1.8937393 |
| ANDROID_SDK_ROOT | /Users/runner/Library/Android/sdk |
### Miscellaneous
- libXext 1.3.5
- libXft 2.3.7
- Tcl/Tk 8.6.13
- Zlib 1.2.13
- libXext 1.3.4
- libXft 2.3.6
- Tcl/Tk 8.6.12_1
- Zlib 1.2.12_1
#### Environment variables
| Name | Value |
| ----------------- | ----------------------------------------------------------------------------------------- |
| PARALLELS_DMG_URL | https://download.parallels.com/desktop/v18/18.2.0-53488/ParallelsDesktop-18.2.0-53488.dmg |
| PARALLELS_DMG_URL | https://download.parallels.com/desktop/v18/18.0.2-53077/ParallelsDesktop-18.0.2-53077.dmg |
##### Notes
##### Notes:
```
If you want to use Parallels Desktop you should download a package from URL stored in
PARALLELS_DMG_URL environment variable. A system extension is allowed for this version.
```
@@ -36,9 +36,9 @@ defaults write com.apple.VoiceOver4/default SCREnableAppleScript -bool YES
# Confirm that the correct intermediate certificate is installed by verifying the expiration date is set to 2030.
# sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain
# Big Sur requires user interaction to add a cert https://developer.apple.com/forums/thread/671582, we need to use a workaround with SecItemAdd swift method
swiftc "${HOME}/image-generation/add-certificate.swift"
if ! is_Catalina; then
swiftc "${HOME}/image-generation/add-certificate.swift"
fi
certs=(
AppleWWDRCAG3.cer
@@ -49,7 +49,11 @@ for cert in ${certs[@]}; do
cert_path="${HOME}/${cert}"
curl "https://www.apple.com/certificateauthority/${cert}" --output ${cert_path} --silent
sudo ./add-certificate ${cert_path}
if is_Catalina; then
sudo security add-trusted-cert -d -r unspecified -k /Library/Keychains/System.keychain ${cert_path}
else
sudo ./add-certificate ${cert_path}
fi
rm ${cert_path}
done
@@ -14,7 +14,6 @@ export AGENT_TOOLSDIRECTORY=$HOME/hostedtoolcache
export RUNNER_TOOL_CACHE=$HOME/hostedtoolcache
export PATH=/Library/Frameworks/Mono.framework/Versions/Current/Commands:$PATH
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:~/.yarn/bin:$PATH
export PATH="/usr/local/opt/curl/bin:$PATH"
@@ -25,9 +24,7 @@ export DOTNET_ROOT=$HOME/.dotnet
export DOTNET_MULTILEVEL_LOOKUP=0
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_FROM_API=1
export HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=3650
export HOMEBREW_CASK_OPTS="--no-quarantine"
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1
@@ -5,6 +5,14 @@ source ~/utils/utils.sh
# Close all finder windows because they can interfere with UI tests
close_finder_window
if is_Catalina; then
# Ignore available updates to prevent system pop-ups
updateName=$(softwareupdate -l | grep "Title: " | awk -F[:,] '{print $2}' | awk '{$1=$1};1') || true
if [ ! -z "$updateName" ]; then
sudo softwareupdate --ignore "$updateName"
fi
fi
# Remove Parallels Desktop
# https://github.com/actions/runner-images/issues/6105
if is_Monterey; then
@@ -12,7 +20,7 @@ if is_Monterey; then
fi
# Put documentation to $HOME root
cp $HOME/image-generation/output/software-report/systeminfo.* $HOME/
cp $HOME/image-generation/output/software-report/systeminfo.txt $HOME/image-generation/output/software-report/systeminfo.md $HOME/
# Put build vm assets scripts to proper directory
mkdir -p /usr/local/opt/$USER/scripts
@@ -28,9 +36,8 @@ rm -rf ~/.fastlane
npm cache clean --force
# Clean yarn cache
if ! is_Ventura; then
yarn cache clean
fi
yarn cache clean
# Clean up temporary directories
sudo rm -rf ~/utils ~/image-generation /tmp/*
@@ -8,8 +8,11 @@ os_name=$(sw_vers -productName)
os_version=$(sw_vers -productVersion)
os_build=$(sw_vers -buildVersion)
label_version=$(echo $os_version | cut -d. -f1,2)
label_version=$(echo $os_version | cut -d. -f1)
if is_Catalina; then
label_version=$(echo $os_version | cut -d. -f1,2)
else
label_version=$(echo $os_version | cut -d. -f1)
fi
image_label="macos-${label_version}"
release_label="macOS-${label_version}"
software_url="https://github.com/actions/runner-images/blob/${release_label}/${image_version}/images/macos/${image_label}-Readme.md"
@@ -35,9 +35,23 @@ ANDROID_NDK_MAJOR_VERSIONS=($(get_toolset_value '.android.ndk."versions"[]'))
ANDROID_NDK_MAJOR_DEFAULT=$(get_toolset_value '.android.ndk.default')
ANDROID_NDK_MAJOR_LATEST=$(get_toolset_value '.android.ndk."versions"[-1]')
# Get the latest command line tools from https://developer.android.com/studio#cmdline-tools
# Newer version(s) require Java 11 by default
# See https://github.com/actions/runner-images/issues/6960
ANDROID_OSX_SDK_URL="https://dl.google.com/android/repository/commandlinetools-mac-9123335_latest.zip"
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
if [[ $cmdlineToolsVersion == "latest" ]]; then
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
cmdlineToolsVersion=$(
yq -p=xml \
'.sdk-repository.remotePackage[] | select(."+path" == "cmdline-tools;latest").archives.archive[].complete.url | select(contains("commandlinetools-mac"))' \
/tmp/repository2-1.xml
)
if [[ -z $cmdlineToolsVersion ]]; then
echo "Failed to parse latest command-line tools version"
exit 1
fi
fi
ANDROID_OSX_SDK_URL="https://dl.google.com/android/repository/${cmdlineToolsVersion}"
ANDROID_HOME=$HOME/Library/Android/sdk
ANDROID_OSX_SDK_FILE=tools-macosx.zip
@@ -97,6 +111,10 @@ done
# The Android Emulator uses the built-in Hypervisor.Framework by default, and falls back to using Intel HAXM if Hypervisor.Framework fails to initialize
# https://developer.android.com/studio/run/emulator-acceleration#vm-mac
# The installation doesn't work properly on macOS Big Sur, /dev/HAX is not created
if is_Catalina; then
chmod +x $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
sudo $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
fi
for addon_name in "${ANDROID_ADDON_LIST[@]}"
do
+13 -5
View File
@@ -9,12 +9,20 @@ brew_smart_install "sox"
# Big Sur doesn't support soundflower installation without user interaction https://github.com/mattingalls/Soundflower/releases/tag/2.0b2
# Install blackhole-2ch for Big Sur instead
if is_Catalina; then
echo "install soundflower"
brew install --cask soundflower
echo "install blackhole-2ch"
brew_smart_install "blackhole-2ch"
echo "set Soundflower (2ch) as input/output device"
SwitchAudioSource -s "Soundflower (2ch)" -t input
SwitchAudioSource -s "Soundflower (2ch)" -t output
else
echo "install blackhole-2ch"
brew_smart_install "blackhole-2ch"
echo "set BlackHole 2ch as input/output device"
SwitchAudioSource -s "BlackHole 2ch" -t input
SwitchAudioSource -s "BlackHole 2ch" -t output
echo "set BlackHole 2ch as input/output device"
SwitchAudioSource -s "BlackHole 2ch" -t input
SwitchAudioSource -s "BlackHole 2ch" -t output
fi
invoke_tests "System" "Audio Device"
+15 -32
View File
@@ -2,41 +2,24 @@
source ~/utils/utils.sh
# Retrieve the name of the CodeQL bundle preferred by the Action (in the format codeql-bundle-YYYYMMDD).
base_url="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)"
codeql_tag_name="$(echo "$base_url" | jq -r '.bundleVersion')"
codeql_cli_version="$(echo "$base_url" | jq -r '.cliVersion')"
prior_codeql_tag_name="$(echo "$base_url" | jq -r '.priorBundleVersion')"
prior_codeql_cli_version="$(echo "$base_url" | jq -r '.priorCliVersion')"
codeql_bundle_name="$(curl -sSL https://raw.githubusercontent.com/github/codeql-action/v2/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##*-}"
# Convert the tag names to bundles with a version number (x.y.z-YYYYMMDD).
codeql_bundle_version="${codeql_cli_version}-${codeql_tag_name##*-}"
prior_codeql_bundle_version="${prior_codeql_cli_version}-${prior_codeql_tag_name##*-}"
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"
codeqlArchive="/tmp/codeql-bundle.tar.gz"
# Download and name both CodeQL bundles.
codeql_bundle_versions=("${codeql_bundle_version}" "${prior_codeql_bundle_version}")
codeql_tag_names=("${codeql_tag_name}" "${prior_codeql_tag_name}")
codeqlToolcachePath="$AGENT_TOOLSDIRECTORY/codeql/$codeql_bundle_version/x64"
mkdir -p $codeqlToolcachePath
for index in "${!codeql_bundle_versions[@]}"; do
bundle_version="${codeql_bundle_versions[$index]}"
bundle_tag_name="${codeql_tag_names[$index]}"
echo "Downloading CodeQL bundle $bundle_version..."
download_with_retries "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz" "/tmp" "codeql-bundle.tar.gz"
codeql_archive="/tmp/codeql-bundle.tar.gz"
echo "Unpacking the downloaded CodeQL bundle archive..."
tar -xzf $codeqlArchive -C $codeqlToolcachePath
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
mkdir -p "$codeql_toolcache_path"
# Touch a special file that indicates to the CodeQL Action that this bundle was baked-in to the hosted runner images.
touch "$codeqlToolcachePath/pinned-version"
echo "Unpacking the downloaded CodeQL bundle archive..."
tar -xzf "$codeql_archive" -C "$codeql_toolcache_path"
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
touch "$codeqlToolcachePath.complete"
# We only pin the latest version in the toolcache, to support overriding the CodeQL version specified in defaults.json on GitHub Enterprise.
if [[ "$bundle_version" == "$codeql_bundle_version" ]]; then
touch "$codeql_toolcache_path/pinned-version"
fi
# Touch a file to indicate to the toolcache that setting up CodeQL is complete.
touch "$codeql_toolcache_path.complete"
done
invoke_tests "Common" "CodeQLBundles"
invoke_tests "Common" "CodeQL"
+10 -19
View File
@@ -13,18 +13,7 @@ done
cask_packages=$(get_toolset_value '.brew.cask_packages[]')
for package in $cask_packages; do
echo "Installing $package..."
if [[ $package == "virtualbox" ]]; then
if ! is_Ventura; then
# VirtualBox 7 crashes
# macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now.
vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb"
download_with_retries $vbcask_url
brew install ./virtualbox.rb
rm ./virtualbox.rb
fi
else
brew install --cask $package
fi
brew install --cask $package
done
# Load "Parallels International GmbH"
@@ -36,20 +25,22 @@ fi
# System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now
if is_Monterey; then
if is_Veertu; then
retry=5
retry=10
while [ $retry -gt 0 ]; do
{
osascript -e 'tell application "System Events" to get application processes where visible is true'
}
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
} && break
retry=$((retry-1))
echo "retries left "$retry
if [ $retry -eq 0 ]; then
echo "No retry attempts left"
exit 1
fi
sleep 10
done
else
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
fi
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
fi
# Validate "Parallels International GmbH" kext
@@ -84,7 +75,7 @@ az extension add -n azure-devops
# Workaround https://github.com/actions/runner-images/issues/4931
# by making Tcl/Tk paths the same on macOS 10.15 and macOS 11
if is_Monterey; then
if is_BigSur; then
version=$(brew info tcl-tk --json | jq -r '.[].installed[].version')
ln -s /usr/local/Cellar/tcl-tk/$version/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
ln -s /usr/local/Cellar/tcl-tk/$version/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib
@@ -1,51 +0,0 @@
$ErrorActionPreference = "Stop"
Import-Module "$env:HOME/image-generation/helpers/Xcode.Helpers.psm1" -DisableNameChecking
Import-Module "$env:HOME/image-generation/software-report/SoftwareReport.Xcode.psm1" -DisableNameChecking
function Ensure-SimulatorInstalled {
param(
[Parameter(Mandatory)]
[string]$RuntimeId,
[Parameter(Mandatory)]
[string]$DeviceId,
[Parameter(Mandatory)]
[string]$SimulatorName,
[Parameter(Mandatory)]
[string]$XcodeVersion
)
$simctlPath = Get-XcodeToolPath -Version $XcodeVersion -ToolName "simctl"
if (-not (Test-Path $simctlPath)) {
Write-Host "Skip validating simulator '$SimulatorName [$RuntimeId]' because Xcode $XcodeVersion is not installed"
return
}
$simulatorFullNameDebug = "$SimulatorName [$RuntimeId]"
Write-Host "Checking Xcode simulator '$simulatorFullNameDebug' (Xcode $XcodeVersion)..."
# Get all available devices
[string]$rawDevicesInfo = Invoke-Expression "$simctlPath list devices --json"
$jsonDevicesInfo = ($rawDevicesInfo | ConvertFrom-Json).devices
# Checking if simulator already exists
$existingSimulator = $jsonDevicesInfo.$RuntimeId | Where-Object { $_.deviceTypeIdentifier -eq $DeviceId } | Select-Object -First 1
if ($null -eq $existingSimulator) {
Write-Host "Simulator '$simulatorFullNameDebug' is missed. Creating it..."
Invoke-Expression "$simctlPath create '$SimulatorName' '$DeviceId' '$RuntimeId'"
} elseif ($existingSimulator.name -ne $SimulatorName) {
Write-Host "Simulator '$simulatorFullNameDebug' is named incorrectly. Renaming it from '$($existingSimulator.name)' to '$SimulatorName'..."
Invoke-Expression "$simctlPath rename '$($existingSimulator.udid)' '$SimulatorName'"
} else {
Write-Host "Simulator '$simulatorFullNameDebug' is installed correctly."
}
}
# First run doesn't provide full data about devices
Get-XcodeInfoList | Out-Null
Write-Host "Validating and fixing Xcode simulators..."
Get-BrokenXcodeSimulatorsList | ForEach-Object {
Ensure-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion
}
+6
View File
@@ -8,6 +8,12 @@ exportPath=$(echo /Library/Java/JavaVirtualMachines/graalvm-ce-java*/Contents/Ho
echo "Setting up GRAALVM_11_ROOT variable to ${exportPath}"
echo "export GRAALVM_11_ROOT=${exportPath}" >> "${HOME}/.bashrc"
# GraalVM not being signed and notarized yet on macOS Catalina
if is_Catalina; then
quarantinePath=$(echo /Library/Java/JavaVirtualMachines/graalvm-ce-java*)
sudo xattr -rd com.apple.quarantine $quarantinePath
fi
# Install Native Image
$exportPath/gu install native-image
+7
View File
@@ -14,6 +14,13 @@ for majorMinorVersion in $minorMajorVersions; do
echo "install ghc version $fullVersion..."
ghcup install $fullVersion
ghcup set $fullVersion
# remove docs and profiling libs
ghc_dir="$(ghcup whereis basedir)/ghc/$fullVersion"
[ -e "${ghc_dir}" ] || exit 1
find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete
rm -r "${ghc_dir}"/share/*
unset ghc_bin_dir ghc_dir
done
echo "install cabal..."
+1 -1
View File
@@ -5,7 +5,7 @@ defaultVersion=$(get_toolset_value '.node.default')
echo "Installing Node.js $defaultVersion"
brew_smart_install "node@$defaultVersion"
brew link node@$defaultVersion --force --overwrite
brew link node@$defaultVersion --force
echo Installing yarn...
curl -o- -L https://yarnpkg.com/install.sh | bash
+8
View File
@@ -77,6 +77,14 @@ for jdkVendor in ${jdkVendors[@]}; do
done
done
# Big Sur or newer does not have these versions of Adopt.
# Also hardcode these versions as they only exist for Adopt
if is_Catalina; then
for adoptVersionToInstall in 12 13 14; do
createEnvironmentVariable ${adoptVersionToInstall} "Adopt"
done
fi
echo Installing Maven...
brew_smart_install "maven"
+4 -5
View File
@@ -2,14 +2,13 @@
source ~/utils/utils.sh
echo Installing PowerShell...
psmetadata=$(curl "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json" -s)
psver=$(echo $psmetadata | jq -r '.LTSReleaseTag[0]')
psDownloadUrl=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-x64.pkg\")" "$psver" "$API_PAT")
psDownloadUrl=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-x64.pkg\")" "latest" "$API_PAT")
download_with_retries $psDownloadUrl "/tmp" "powershell.pkg"
# Work around the issue on macOS Big Sur 11.5 or higher for possible error message ("can't be opened because Apple cannot check it for malicious software") when installing the package
sudo xattr -rd com.apple.quarantine /tmp/powershell.pkg
if ! is_Catalina; then
sudo xattr -rd com.apple.quarantine /tmp/powershell.pkg
fi
sudo installer -pkg /tmp/powershell.pkg -target /
+1 -1
View File
@@ -20,7 +20,7 @@ fi
# Explicitly overwrite symlinks created by Python2 such as /usr/local/bin/2to3 since they conflict with symlinks from Python3
# https://github.com/actions/runner-images/issues/2322
echo "Brew Installing Python 3"
brew_smart_install "python@3.11" || brew link --overwrite python@3.11
brew_smart_install "python@3.10" || brew link --overwrite python@3.10
echo "Installing pipx"
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin

Some files were not shown because too many files have changed in this diff Show More