Skip to content
Snippets Groups Projects
Commit ddf407eb authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

ci: check whether all build artifacts are gitignored

parent 2b610ef6
No related branches found
No related tags found
1 merge request!60CI: check whether .gitignore is up-to-date
......@@ -129,7 +129,7 @@ include:
before_script:
- set -euo pipefail
- module purge
- module load gcc/11.2.0-gcc-11.2.0
- module load git gcc/11.2.0-gcc-11.2.0
- |
# Install libcheck
if test ! -d "${LIBCHECK_ROOT}"; then
......@@ -165,6 +165,24 @@ include:
exit 1
}
rm -rf "${BUILD_LOG}" "${compiler_warnings}"
- |
# Check if there are untracked files
untracked_files=$( \
git -C "${CI_PROJECT_DIR}" \
-c core.excludesfile= \
ls-files --others \
--exclude-standard \
--exclude="${LIBCHECK_ROOT#"${CI_PROJECT_DIR}"}" \
--exclude="${INSTALL_PREFIX#"${CI_PROJECT_DIR}"}" \
)
test -z "${untracked_files}" || {
printf "${RED}The job produced unexpected files:\n${untracked_files}\n\
If the files above are CI-specific, please, update the \
'${CI_CONFIG_PATH}' file either to remove the files before running this \
check or to exclude them from the check. Otherwise, update the \
'.gitignore' file.\n${DEFAULT}"
exit 1
}
rules:
- if: $CI_PIPELINE_SOURCE == "web"
when: manual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment