Commit 837a74e6 authored by Robert Speicher's avatar Robert Speicher

Merge branch...

Merge branch '4942-create-a-new-job-to-check-that-ee-specific-files-are-added-to-the-top-level-ee-folder' into 'master'

Resolve "Create a new job to check that EE-specific files are added to the top-level ee/ folder"

Closes #4942

See merge request gitlab-org/gitlab-ee!4553
parents 30d42bcd 5d3e9cde
......@@ -289,6 +289,14 @@ retrieve-tests-metadata:
- wget -O $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH || rm $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
- '[[ -f $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
ee-files-location-check:
<<: *dedicated-runner
stage: prepare
before_script: []
cache: {}
script:
- scripts/ee-files-location-check
update-tests-metadata:
<<: *tests-metadata-state
<<: *only-canonical-masters
......
#!/usr/bin/env ruby
WHITELIST = %w[
CHANGELOG-EE.md
app/assets/javascripts/**/*
changelogs/unreleased-ee/**/*
config/**/*
doc/**/*
scripts/*
spec/javascripts/**/*
].freeze
`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 fetch canonical-ee master --quiet`
`git fetch canonical-ce master --quiet`
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)
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)
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
status = 0
new_ee_specific_files_not_at_the_ee_top_level.each do |file|
next if WHITELIST.any? { |pattern| Dir.glob(pattern).include?(file) }
puts
puts "* #{file} is EE-specific and should be moved to ee/#{file}:"
puts " => git mv #{file} ee/#{file}"
status = 1
end
`git remote remove canonical-ee`
`git remote remove canonical-ce`
exit(status)
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