mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Install compose v1 and v2 alongside (#4203)
This commit is contained in:
@@ -109,7 +109,8 @@ $toolsList = @(
|
|||||||
(Get-CMakeVersion),
|
(Get-CMakeVersion),
|
||||||
(Get-DockerMobyClientVersion),
|
(Get-DockerMobyClientVersion),
|
||||||
(Get-DockerMobyServerVersion),
|
(Get-DockerMobyServerVersion),
|
||||||
(Get-DockerComposeVersion),
|
(Get-DockerComposeV1Version),
|
||||||
|
(Get-DockerComposeV2Version),
|
||||||
(Get-DockerBuildxVersion),
|
(Get-DockerBuildxVersion),
|
||||||
(Get-GitVersion),
|
(Get-GitVersion),
|
||||||
(Get-GitLFSVersion),
|
(Get-GitLFSVersion),
|
||||||
|
|||||||
@@ -63,9 +63,14 @@ function Get-CMakeVersion {
|
|||||||
return "CMake $cmakeVersion"
|
return "CMake $cmakeVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-DockerComposeVersion {
|
function Get-DockerComposeV1Version {
|
||||||
$composeVersion = docker-compose -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter ","
|
$composeVersion = docker-compose -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter ","
|
||||||
return "Docker Compose $composeVersion"
|
return "Docker Compose v1 $composeVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-DockerComposeV2Version {
|
||||||
|
$composeVersion = docker compose version | Take-OutputPart -Part 3
|
||||||
|
return "Docker Compose v2 $composeVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-DockerMobyClientVersion {
|
function Get-DockerMobyClientVersion {
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ URL="https://github.com/docker/compose/releases/download/1.29.2/docker-compose-L
|
|||||||
curl -L $URL -o /usr/local/bin/docker-compose
|
curl -L $URL -o /usr/local/bin/docker-compose
|
||||||
chmod +x /usr/local/bin/docker-compose
|
chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
invoke_tests "Tools" "Docker-compose"
|
invoke_tests "Tools" "Docker-compose v1"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ if ! IsPackageInstalled $docker_package; then
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y moby-engine moby-cli
|
apt-get install -y moby-engine moby-cli
|
||||||
apt-get install --no-install-recommends -y moby-buildx
|
apt-get install --no-install-recommends -y moby-buildx
|
||||||
|
apt-get install -y moby-compose
|
||||||
else
|
else
|
||||||
echo "Docker ($docker_package) is already installed"
|
echo "Docker ($docker_package) is already installed"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ Describe "Docker" {
|
|||||||
"docker buildx" | Should -ReturnZeroExitCode
|
"docker buildx" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "docker compose v2" {
|
||||||
|
"docker compose" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
Context "docker images" {
|
Context "docker images" {
|
||||||
$testCases = (Get-ToolsetContent).docker.images | ForEach-Object { @{ ImageName = $_ } }
|
$testCases = (Get-ToolsetContent).docker.images | ForEach-Object { @{ ImageName = $_ } }
|
||||||
|
|
||||||
@@ -75,7 +79,7 @@ Describe "Docker" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Docker-compose" {
|
Describe "Docker-compose v1" {
|
||||||
It "docker-compose" {
|
It "docker-compose" {
|
||||||
"docker-compose --version"| Should -ReturnZeroExitCode
|
"docker-compose --version"| Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user