Commit e8de0436 authored by Sean McGivern's avatar Sean McGivern

Add lint-changelog-filenames job

This job checks that files in the unreleased changelogs directories have
the correct .yml extension. It ignores the .gitkeep files already there.
parent 1749b9b9
......@@ -13,5 +13,5 @@ lint-ci-gitlab:
variables:
LINT_PATHS: .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates changelogs
script:
- '[[ -d "ee/" ]] && export LINT_PATHS="$LINT_PATHS ee/changelogs"'
- '[[ ! -d "ee/" ]] || export LINT_PATHS="$LINT_PATHS ee/changelogs"'
- yamllint $LINT_PATHS
#!/bin/sh
lint_paths="changelogs/unreleased"
[ -d "ee/" ] && lint_paths="$lint_paths ee/changelogs/unreleased"
invalid_files=$(find $lint_paths -type f -not -name "*.yml" -not -name ".gitkeep")
if [ -n "$invalid_files" ]; then
echo "Changelog files must end in .yml, but these did not:"
echo "$invalid_files" | sed -e "s/^/* /"
exit 1
fi
......@@ -48,7 +48,8 @@ def jobs_to_run(node_index, node_total)
%w[bundle exec rubocop --parallel],
%w[scripts/lint-conflicts.sh],
%w[scripts/lint-rugged],
%w[scripts/frontend/check_no_partial_karma_jest.sh]
%w[scripts/frontend/check_no_partial_karma_jest.sh],
%w[scripts/lint-changelog-filenames]
]
case node_total
......
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