From 39a723ee12417778cff034b7fb1b6be240b77dea Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 9 Feb 2024 12:28:20 +0100 Subject: [PATCH] Don't pull compose images That pull take 30-40s per job, which is quite insane when these image rarely if ever change. Of course if they significantly change it would cause problem, but then we should probably find another way to deal with this like running a specific tag that is committed in this repo and that we manually update once in a while. --- lib/buildkite/config/rake_command.rb | 1 - test/buildkite_config/test_rake_command.rb | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/lib/buildkite/config/rake_command.rb b/lib/buildkite/config/rake_command.rb index cd61e4c2..1e73432f 100644 --- a/lib/buildkite/config/rake_command.rb +++ b/lib/buildkite/config/rake_command.rb @@ -59,7 +59,6 @@ def rake(dir = "", task = "test", service: "default", pre_steps: [], &block) plugin :docker_compose, { "env" => %w[PRE_STEPS RACK], "run" => service, - "pull" => service, "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", dir], } diff --git a/test/buildkite_config/test_rake_command.rb b/test/buildkite_config/test_rake_command.rb index 29233ee4..60aab7cd 100644 --- a/test/buildkite_config/test_rake_command.rb +++ b/test/buildkite_config/test_rake_command.rb @@ -70,7 +70,6 @@ def test_command { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "test"] } }] }] } assert_equal expected, pipeline.to_h @@ -100,7 +99,6 @@ def test_default_task { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "activerecord"] } }] }] } assert_equal expected, pipeline.to_h @@ -131,7 +129,6 @@ def test_multiple { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "first"] } }] }, { "label" => "second all (3.2)", @@ -147,7 +144,6 @@ def test_multiple { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "second"] } }] }] } assert_equal expected, pipeline.to_h @@ -177,7 +173,6 @@ def test_docker_compose_plugin { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "myservice", - "pull" => "myservice", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "subdirectory"] } }] }] } assert_equal expected, pipeline.to_h @@ -208,7 +203,6 @@ def test_env_yjit { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -240,7 +234,6 @@ def test_env_pre_steps { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -273,7 +266,6 @@ def test_agents { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -306,7 +298,6 @@ def test_artifact_paths { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -342,7 +333,6 @@ def test_automatic_retry_on { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -375,7 +365,6 @@ def test_timeout_in_minutes { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -409,7 +398,6 @@ def test_soft_fail { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -442,7 +430,6 @@ def test_soft_fail_ruby { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", ""] } }] }] } assert_equal expected, pipeline.to_h @@ -475,7 +462,6 @@ def test_rake_with_block { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "test"] } }] }] } assert_equal expected, pipeline.to_h @@ -505,7 +491,6 @@ def test_rake_mysql_image_and_task_rails { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "default", - "pull" => "default", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "activerecord"] } }] }] } assert_equal expected, pipeline.to_h @@ -537,7 +522,6 @@ def test_rake_mysql_image_and_task_rails_5_x { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "mysqldb", - "pull" => "mysqldb", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "activerecord"] } }] }] } assert_equal expected, pipeline.to_h @@ -569,7 +553,6 @@ def test_rake_mysql_image_and_task_rails_4_x { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "mysqldb", - "pull" => "mysqldb", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "activerecord"] } }] }] } assert_equal expected, pipeline.to_h @@ -601,7 +584,6 @@ def test_rake_postgres_image_and_task_rails_5_1 { "docker-compose#v1.0" => { "env" => ["PRE_STEPS", "RACK"], "run" => "postgresdb", - "pull" => "postgresdb", "config" => ".buildkite/docker-compose.yml", "shell" => ["runner", "activerecord"] } }] }] } assert_equal expected, pipeline.to_h