From 202304117fb0aed0964b51a633db94797b527fa1 Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:52:52 +0100 Subject: [PATCH] [Ubuntu] remove Docker Comose v1 (#9559) --- .../scripts/build/install-docker-compose.sh | 21 ------------------- .../docs-gen/Generate-SoftwareReport.ps1 | 1 - .../docs-gen/SoftwareReport.Tools.psm1 | 5 ----- images/ubuntu/scripts/tests/Tools.Tests.ps1 | 8 +------ images/ubuntu/templates/ubuntu-20.04.pkr.hcl | 2 +- images/ubuntu/templates/ubuntu-22.04.pkr.hcl | 2 +- 6 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 images/ubuntu/scripts/build/install-docker-compose.sh diff --git a/images/ubuntu/scripts/build/install-docker-compose.sh b/images/ubuntu/scripts/build/install-docker-compose.sh deleted file mode 100644 index 4d152c77c3914..0000000000000 --- a/images/ubuntu/scripts/build/install-docker-compose.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: install-docker-compose.sh -## Desc: Install Docker Compose v1 -## Supply chain security: Docker Compose v1 - checksum validation -################################################################################ - -# Source the helpers for use with the script -source $HELPER_SCRIPTS/install.sh - -# Download docker-compose v1 from releases -binary_path=$(download_with_retry "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64") - -# Supply chain security - Docker Compose v1 -external_hash="f3f10cf3dbb8107e9ba2ea5f23c1d2159ff7321d16f0a23051d68d8e2547b323" -use_checksum_comparison "${binary_path}" "${external_hash}" - -# Install docker-compose v1 -install "${binary_path}" "/usr/local/bin/docker-compose" - -invoke_tests "Tools" "Docker-compose v1" diff --git a/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 index 758d7c91e4d52..1bae35381a6d3 100644 --- a/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -105,7 +105,6 @@ $tools.AddToolVersion("Buildah", $(Get-BuildahVersion)) $tools.AddToolVersion("CMake", $(Get-CMakeVersion)) $tools.AddToolVersion("CodeQL Action Bundle", $(Get-CodeQLBundleVersion)) $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 Client", $(Get-DockerClientVersion)) diff --git a/images/ubuntu/scripts/docs-gen/SoftwareReport.Tools.psm1 b/images/ubuntu/scripts/docs-gen/SoftwareReport.Tools.psm1 index a61b0a8d7aab8..46ff6947a4106 100644 --- a/images/ubuntu/scripts/docs-gen/SoftwareReport.Tools.psm1 +++ b/images/ubuntu/scripts/docs-gen/SoftwareReport.Tools.psm1 @@ -58,11 +58,6 @@ function Get-CMakeVersion { return $cmakeVersion } -function Get-DockerComposeV1Version { - $composeVersion = docker-compose -v | Get-StringPart -Part 2 | Get-StringPart -Part 0 -Delimiter "," - return $composeVersion -} - function Get-DockerComposeV2Version { $composeVersion = docker compose version | Get-StringPart -Part 3 | Get-StringPart -Part 0 -Delimiter "v" return $composeVersion diff --git a/images/ubuntu/scripts/tests/Tools.Tests.ps1 b/images/ubuntu/scripts/tests/Tools.Tests.ps1 index a58f052e9dfe5..7baa3e8be384c 100644 --- a/images/ubuntu/scripts/tests/Tools.Tests.ps1 +++ b/images/ubuntu/scripts/tests/Tools.Tests.ps1 @@ -83,7 +83,7 @@ Describe "Docker" { } } - It "docker compose v2" { + It "Docker compose v2" { $version=(Get-ToolsetContent).docker.plugins | Where-Object { $_.plugin -eq 'compose' } | Select-Object -ExpandProperty version If ($version -ne "latest") { $(docker compose version --short) | Should -BeLike "*$version*" @@ -105,12 +105,6 @@ Describe "Docker images" { } } -Describe "Docker-compose v1" { - It "docker-compose" { - "docker-compose --version"| Should -ReturnZeroExitCode - } -} - Describe "Ansible" { It "Ansible" { "ansible --version" | Should -ReturnZeroExitCode diff --git a/images/ubuntu/templates/ubuntu-20.04.pkr.hcl b/images/ubuntu/templates/ubuntu-20.04.pkr.hcl index fd3a295b79209..e6d74c2c4d558 100644 --- a/images/ubuntu/templates/ubuntu-20.04.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-20.04.pkr.hcl @@ -344,7 +344,7 @@ build { provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DOCKERHUB_LOGIN=${var.dockerhub_login}", "DOCKERHUB_PASSWORD=${var.dockerhub_password}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/install-docker-compose.sh", "${path.root}/../scripts/build/install-docker.sh"] + scripts = ["${path.root}/../scripts/build/install-docker.sh"] } provisioner "shell" { diff --git a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl index 473e597cd3a02..702bb47a8ec8f 100644 --- a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl @@ -340,7 +340,7 @@ build { provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DOCKERHUB_LOGIN=${var.dockerhub_login}", "DOCKERHUB_PASSWORD=${var.dockerhub_password}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/install-docker-compose.sh", "${path.root}/../scripts/build/install-docker.sh"] + scripts = ["${path.root}/../scripts/build/install-docker.sh"] } provisioner "shell" {