Skip to content

Commit

Permalink
Remove unused docker-compose files and parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlcarlson committed Apr 22, 2024
1 parent 6422adf commit efbcea4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
10 changes: 1 addition & 9 deletions spec/helper/get_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
def get_defaults(_facts)
bip = :undef
bridge = :undef
compose_base_url = 'https://github.com/docker/compose/releases/download'
compose_symlink_name = 'docker-compose'
curl_ensure = true
default_gateway = :undef
default_gateway_ipv6 = :undef
Expand Down Expand Up @@ -88,18 +86,15 @@ def get_defaults(_facts)
tmp_dir = '/tmp/'
tmp_dir_config = true
version = :undef
compose_version = :undef

if _facts[:os]['family'] == 'windows'
compose_install_path = "#{_facts['docker_program_files_path']}/Docker"
compose_version = '1.21.2'
docker_ee_package_name = 'Docker'
machine_install_path = "#{_facts['docker_program_files_path']}/Docker"
tls_cacert = "#{_facts['docker_program_data_path']}/docker/certs.d/ca.pem"
tls_cert = "#{_facts['docker_program_data_path']}/docker/certs.d/server-cert.pem"
tls_key = "#{_facts['docker_program_data_path']}/docker/certs.d/server-key.pem"
else
compose_install_path = '/usr/local/bin'
compose_version = '1.9.0'
docker_ee_package_name = 'docker-ee'
machine_install_path = '/usr/local/bin'
tls_cacert = '/etc/docker/tls/ca.pem'
Expand Down Expand Up @@ -340,9 +335,6 @@ def get_defaults(_facts)
'apt_source_pin_level' => apt_source_pin_level,
'bip' => bip,
'bridge' => bridge,
'compose_base_url' => compose_base_url,
'compose_install_path' => compose_install_path,
'compose_symlink_name' => compose_symlink_name,
'compose_version' => compose_version,
'curl_ensure' => curl_ensure,
'default_gateway' => default_gateway,
Expand Down
36 changes: 0 additions & 36 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,39 +112,6 @@ def fetch_puppet_version
image: *default-image
command: /bin/sh -c "while true; do echo hello world; sleep 1; done"
EOS
docker_compose_content_v3_windows = <<~EOS
version: "3"
services:
compose_test:
image: winamd64/hello-seattle
command: cmd.exe /C "ping 8.8.8.8 -t"
networks:
default:
external:
name: nat
EOS
docker_compose_override_v3_windows = <<~EOS
version: "3"
services:
compose_test:
image: winamd64/hello-seattle:nanoserver
command: cmd.exe /C "ping 8.8.8.8 -t"
networks:
default:
external:
name: nat
EOS
docker_compose_override_v3_windows2016 = <<~EOS
version: "3"
services:
compose_test:
image: winamd64/hello-seattle:nanoserver-sac2016
command: cmd.exe /C "ping 8.8.8.8 -t"
networks:
default:
external:
name: nat
EOS
docker_stack_content_windows = <<~EOS
version: "3"
services:
Expand All @@ -165,13 +132,10 @@ def fetch_puppet_version
image: winamd64/hello-seattle:nanoserver-sac2016
EOS
if os[:family] == 'windows'
create_remote_file(host, '/tmp/docker-compose-v3.yml', docker_compose_content_v3_windows)
create_remote_file(host, '/tmp/docker-stack.yml', docker_stack_content_windows)
if %r{2019|2022}.match?(os[:release])
create_remote_file(host, '/tmp/docker-compose-override-v3.yml', docker_compose_override_v3_windows)
create_remote_file(host, '/tmp/docker-stack-override.yml', docker_stack_override_windows)
else
create_remote_file(host, '/tmp/docker-compose-override-v3.yml', docker_compose_override_v3_windows2016)
create_remote_file(host, '/tmp/docker-stack-override.yml', docker_stack_override_windows2016)
end
else
Expand Down

0 comments on commit efbcea4

Please sign in to comment.