Commit d2e73457 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make sure after checking out it's clean

parent de29d2ae
...@@ -27,12 +27,7 @@ module EESpecificCheck ...@@ -27,12 +27,7 @@ module EESpecificCheck
end end
def find_compare_base def find_compare_base
# We're still seeing errors not ignoring knapsack/ and rspec_flaky/ git_clean
# Instead of waiting that populate over all the branches, we could
# just remove untracked files anyway, only on CI of course in case
# we're wiping people's data!
# See https://gitlab.com/gitlab-org/gitlab-ee/issues/5912
git_clean if ENV['CI']
setup_canonical_remotes setup_canonical_remotes
...@@ -76,6 +71,7 @@ module EESpecificCheck ...@@ -76,6 +71,7 @@ module EESpecificCheck
# Use detached HEAD so that we don't update HEAD # Use detached HEAD so that we don't update HEAD
run_git_command("checkout -f #{ce_fetch_head}") run_git_command("checkout -f #{ce_fetch_head}")
git_clean
# We rebase onto the commit which is the latest commit presented in both # We rebase onto the commit which is the latest commit presented in both
# CE and EE, i.e. ce_merge_base, cutting off commits aren't merged into # CE and EE, i.e. ce_merge_base, cutting off commits aren't merged into
...@@ -137,6 +133,7 @@ module EESpecificCheck ...@@ -137,6 +133,7 @@ module EESpecificCheck
ensure # ensure would still run if we call exit, don't worry ensure # ensure would still run if we call exit, don't worry
# Make sure to switch back # Make sure to switch back
run_git_command("checkout -f #{head}") run_git_command("checkout -f #{head}")
git_clean
end end
def head_commit_sha def head_commit_sha
...@@ -148,7 +145,13 @@ module EESpecificCheck ...@@ -148,7 +145,13 @@ module EESpecificCheck
end end
def git_clean def git_clean
run_git_command('clean -fd') # We're still seeing errors not ignoring knapsack/ and rspec_flaky/
# Instead of waiting that populate over all the branches, we could
# just remove untracked files anyway, only on CI of course in case
# we're wiping people's data!
# See https://gitlab.com/gitlab-org/gitlab-ee/issues/5912
# Also see https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/68194333
run_git_command('clean -fd') if ENV['CI']
end end
def remove_remotes def remove_remotes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment