Created
May 7, 2021 10:52
-
-
Save sparse91/24e0bb7fb2ce164d4781b4ef51ac70ac to your computer and use it in GitHub Desktop.
Gitlab Community Edition (CE) quota limit per project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
### | |
### /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive.d/quota.sh | |
### limit: 100MB | |
### | |
REPO_SIZE="$(du -s . | cut -f1)" | |
if (( "$REPO_SIZE" > 102400 )) | |
then | |
echo "Error: 100 MB quota per repo exceeded! Your size is $(( $REPO_SIZE / 1024 )) MB." | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment