Commit c511f7c8 authored by Mitar's avatar Mitar

Make sure there are no large files.

parent 660e9ff6
Pipeline #95871656 passed with stages
in 29 minutes and 7 seconds
......@@ -3,6 +3,8 @@ image: registry.gitlab.com/datadrivendiscovery/images/testing:ubuntu-bionic-pyth
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
services:
- docker:dind
......@@ -13,6 +15,9 @@ before_script:
validate:
stage: test
before_script:
- git lfs fetch --all
script:
- python3 ./run_validation.py --clean
......@@ -23,6 +28,9 @@ validate:
validate_devel:
stage: test
before_script:
- git lfs fetch --all
script:
- python3 ./run_validation.py --devel --clean
......@@ -37,6 +45,9 @@ validate_all:
parallel: 10
before_script:
- git lfs fetch --all
script:
- python3 ./run_validation.py --clean --all --parallel-index "$CI_NODE_INDEX" --parallel-total "$CI_NODE_TOTAL"
......@@ -44,6 +55,15 @@ validate_all:
refs:
- [email protected]/primitives
git_check:
stage: build
before_script:
- git lfs fetch --all
script:
- ./git-check.sh
trigger_images_rebuild:
stage: deploy
......
......@@ -10,12 +10,12 @@ if git rev-list --objects --all \
exit 1
fi
if git lfs ls-files --name-only | xargs stat -c '%s %n' | awk '$1 < 100*(2^10)' | awk '{print $2}' | grep . ; then
if git lfs ls-files --name-only | xargs -r stat -c '%s %n' | awk '$1 < 100*(2^10)' | awk '{print $2}' | grep . ; then
echo "Repository contains LFS objects smaller than 100 KB."
exit 1
fi
if git lfs ls-files --name-only | xargs stat -c '%s %n' | awk '$1 >= 2*(2^30)' | awk '{print $2}' | grep . ; then
if git lfs ls-files --name-only | xargs -r stat -c '%s %n' | awk '$1 >= 2*(2^30)' | awk '{print $2}' | grep . ; then
echo "Repository contains LFS objects not smaller than 2 GB."
exit 1
fi
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