Commit e7e4f30d authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ee-fix-ee-files-location-check' into 'master'

[EE] Fix `ee-files-location-check` job

See merge request gitlab-org/gitlab-ee!4598
parents b9dd33c3 6779c88c
...@@ -13,11 +13,21 @@ WHITELIST = %w[ ...@@ -13,11 +13,21 @@ WHITELIST = %w[
`git remote add canonical-ee https://gitlab.com/gitlab-org/gitlab-ee.git` `git remote add canonical-ee https://gitlab.com/gitlab-org/gitlab-ee.git`
`git remote add canonical-ce https://gitlab.com/gitlab-org/gitlab-ce.git` `git remote add canonical-ce https://gitlab.com/gitlab-org/gitlab-ce.git`
`git fetch canonical-ee master --quiet` `git fetch canonical-ee master --quiet`
`git fetch canonical-ce master --quiet`
new_files_in_this_branch_not_at_the_ee_top_level = 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) `git diff canonical-ee/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
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
ee_specific_files_in_ce_master_not_at_the_ee_top_level = ee_specific_files_in_ce_master_not_at_the_ee_top_level =
`git diff canonical-ce/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip) `git diff FETCH_HEAD..HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`.lines.map(&:strip)
new_ee_specific_files_not_at_the_ee_top_level = new_ee_specific_files_not_at_the_ee_top_level =
new_files_in_this_branch_not_at_the_ee_top_level & ee_specific_files_in_ce_master_not_at_the_ee_top_level new_files_in_this_branch_not_at_the_ee_top_level & ee_specific_files_in_ce_master_not_at_the_ee_top_level
......
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