mirror of
https://github.com/actions/runner-images.git
synced 2026-01-20 11:21:26 +08:00
Update slim software report gen
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# This script builds and runs various tests on the ubuntu-slim Docker image
|
||||
# to ensure it contains the expected software and configurations.
|
||||
# The build and test workflows for docker images expect this script to be present.
|
||||
#
|
||||
# Usage: test.sh [IMAGE_NAME]
|
||||
# If IMAGE_NAME is not provided, defaults to ubuntu-slim:test
|
||||
|
||||
show_help() {
|
||||
echo "Usage: $0 [IMAGE_NAME]"
|
||||
echo ""
|
||||
@@ -76,6 +69,15 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$OUTPUT_DIR/software-report.json" ]; then
|
||||
cp "$OUTPUT_DIR/software-report.json" ubuntu-slim-Report.json
|
||||
echo "✓ Copied software-report.json to current directory"
|
||||
else
|
||||
echo "✗ Error: software-report.json was not generated"
|
||||
rm -rf "$OUTPUT_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean up temporary directory
|
||||
rm -rf "$OUTPUT_DIR"
|
||||
echo "✓ Software report generation complete"
|
||||
|
||||
@@ -46,6 +46,9 @@ $packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
||||
$tools = $installedSoftware.AddHeader("Tools")
|
||||
$tools.AddToolVersion("AzCopy", $(Get-AzCopyVersion))
|
||||
$tools.AddToolVersion("Bicep", $(Get-BicepVersion))
|
||||
$tools.AddToolVersion("Docker Compose v2", $(Get-DockerComposeV2Version))
|
||||
$tools.AddToolVersion("Docker-Buildx", $(Get-DockerBuildxVersion))
|
||||
$tools.AddToolVersion("Docker Client", $(Get-DockerClientVersion))
|
||||
$tools.AddToolVersion("Git", $(Get-GitVersion))
|
||||
$tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
|
||||
$tools.AddToolVersion("Git-ftp", $(Get-GitFTPVersion))
|
||||
|
||||
@@ -77,3 +77,18 @@ function Get-YqVersion {
|
||||
$yqVersion = $(yq -V) | Get-StringPart -Part 3
|
||||
return $yqVersion.TrimStart("v").Trim()
|
||||
}
|
||||
|
||||
function Get-DockerComposeV2Version {
|
||||
$composeVersion = docker compose version | Get-StringPart -Part 3 | Get-StringPart -Part 0 -Delimiter "v"
|
||||
return $composeVersion
|
||||
}
|
||||
|
||||
function Get-DockerClientVersion {
|
||||
$dockerClientVersion = sudo docker version --format '{{.Client.Version}}'
|
||||
return $dockerClientVersion
|
||||
}
|
||||
|
||||
function Get-DockerBuildxVersion {
|
||||
$buildxVersion = docker buildx version | Get-StringPart -Part 1 | Get-StringPart -Part 0 -Delimiter "v"
|
||||
return $buildxVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user