This file contains 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
//just paste this in the debug console | |
function setRandomCategories(categories) { | |
console.clear(); | |
categories = !categories ? 5 : categories; | |
var inputs = $($("table")[2]).find("input"); | |
var max = inputs.length; | |
for (var i = 0; i < categories; i++) { | |
var randIndex = Math.floor(Math.random() * max); |
This file contains 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 | |
BASE_PATH=/var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/repositories | |
DRY_RUN=0 | |
KEEP_LAST_IMAGES=10 | |
RUN_GARBAGE_COLLECTOR=0 | |
GITLAB_CTL_COMMAND=`which gitlab-ctl` | |
This file contains 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 | |
# This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh) | |
# Improvements | |
# - Searching in all BASE_PATH, not fixing the search to a depth of 2 | |
# - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues) | |
# - Logging in case there's nothing to delete | |
# - running registry-garbage-collect only when something has been deleted |