From 7288bc277bc707b31d3ab2077bf70e7bd243bd8d Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 15 Mar 2023 10:54:47 +0000 Subject: [PATCH] DEV: Update docker_test to checkout specific branch by default (#20684) Previously, FETCH_HEAD would always point to tests-passed because our base docker image was configured to only fetch the tests-passed branch. Since https://github.com/discourse/discourse_docker/commit/53bbacc882, we switched to a partial clone which means that `git fetch; git checkout FETCH_HEAD` will checkout whichever remote branch is the first alphabetically. This commit makes the checkout more specific to avoid this issue. --- script/docker_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/docker_test.rb b/script/docker_test.rb index d51b63b5c5..1c50dd7cf5 100644 --- a/script/docker_test.rb +++ b/script/docker_test.rb @@ -23,7 +23,7 @@ unless ENV["NO_UPDATE"] run_or_fail("git reset --hard") run_or_fail("git fetch") - checkout = ENV["COMMIT_HASH"] || "FETCH_HEAD" + checkout = ENV["COMMIT_HASH"] || "origin/tests-passed" run_or_fail("LEFTHOOK=0 git checkout #{checkout}") run_or_fail("bundle")