Commit 7f3c97f8 authored by Rémy Coutable's avatar Rémy Coutable

Fix the ee-files-location-check job for forks

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 6da3156e
......@@ -18,14 +18,11 @@ WHITELIST = [
new_files_in_this_branch_not_at_the_ee_top_level =
`git diff canonical-ee/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
ce_repo_url = ENV['CI_REPOSITORY_URL'].sub('gitlab-ee', 'gitlab-ce')
current_branch = ENV.fetch('CI_COMMIT_REF_NAME', `git rev-parse --abbrev-ref HEAD`).strip
ce_branch_name = current_branch.sub(/(\Aee\-|\-ee\z)/, '')
`git fetch canonical-ce #{ce_branch_name} --quiet`
unless $?.success?
`git fetch canonical-ce 'master' --quiet`
end
`git fetch #{ce_repo_url} #{ce_branch_name} --quiet` || `git fetch canonical-ce 'master' --quiet`
ee_specific_files_in_ce_master_not_at_the_ee_top_level =
`git diff FETCH_HEAD..HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
......
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