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.
This commit is contained in:
David Taylor 2023-03-15 10:54:47 +00:00 committed by GitHub
parent be354e7950
commit 7288bc277b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")