Skip to content
Snippets Groups Projects
Commit 0be32546 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

we cannot (yet) automate registry garbage collection

parent 5cbb6f69
No related tags found
No related merge requests found
Pipeline #4018 passed
......@@ -12,12 +12,4 @@ RUN apk add --update \
COPY scripts /scripts
WORKDIR /scripts
CMD php deleteOldBranches.php && \
helm repo add gitlab https://charts.gitlab.io/ && \
helm repo update && \
export GITLAB_VERSION=$(helm ls -o json | jq -c -r '.[] | select(.name == "gitlab") | .chart' | cut -d"-" -f2) && \
helm get values gitlab > gitlab.yml && \
helm upgrade gitlab gitlab/gitlab -f gitlab.yml --version=$GITLAB_VERSION --set registry.maintenance.readOnly.enabled=true --wait && \
POD=$(kubectl -n gitlab-suma get pods -l app=registry -o jsonpath='{.items[0].metadata.name}') && \
kubectl exec $pod --/bin/registry garbage-collect && \
helm upgrade gitlab gitlab/gitlab -f gitlab.yml --version=$GITLAB_VERSION
\ No newline at end of file
CMD php deleteOldBranches.php
\ No newline at end of file
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