Commit bb62fc6b authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '345599-add-no-jh-check' into 'master'

Resolve "Add a `no-jh-check` job to prevent changes added to `jh/`"

See merge request gitlab-org/gitlab!74425
parents fa0ddfc3 6b94d13c
......@@ -1776,7 +1776,7 @@
changes: *code-backstage-patterns
when: on_success
.setup:rules:no_ee_check:
.setup:rules:no-ee-check:
rules:
- <<: *if-not-foss
when: never
......@@ -1784,6 +1784,14 @@
changes: *code-backstage-patterns
when: on_success
.setup:rules:no-jh-check:
rules:
- <<: *if-jh
when: never
- <<: *if-default-refs
changes: *code-backstage-patterns
when: on_success
.setup:rules:verify-tests-yml:
rules:
- <<: *if-not-ee
......
......@@ -41,13 +41,21 @@ gitlab_git_test:
script:
- spec/support/prepare-gitlab-git-test-for-commit --check-for-changes
no_ee_check:
no-ee-check:
extends:
- .minimal-job
- .setup:rules:no_ee_check
- .setup:rules:no-ee-check
stage: test
script:
- scripts/no-ee-check
- scripts/no-dir-check ee
no-jh-check:
extends:
- .minimal-job
- .setup:rules:no-jh-check
stage: test
script:
- scripts/no-dir-check jh
verify-tests-yml:
extends:
......
#!/usr/bin/env ruby
# frozen_string_literal: true
dir_name = ARGV.first || abort('ERROR: Please specify a directory.')
dir_path = File.expand_path(dir_name, "#{__dir__}/..")
if Dir.exist?(dir_path)
abort("ERROR: This repository contains #{dir_name}/ directory. #{dir_name.upcase} changes should go to the corresponding repository.")
end
#!/usr/bin/env ruby
# frozen_string_literal: true
ee_path = File.join(File.expand_path(__dir__), '../ee')
if Dir.exist?(ee_path)
puts 'The repository contains /ee directory. There should be no /ee directory in CE repo.'
exit 1
end
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