Commit 0be32546 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

we cannot (yet) automate registry garbage collection

parent 5cbb6f69
Pipeline #4018 passed with stage
in 40 seconds
...@@ -12,12 +12,4 @@ RUN apk add --update \ ...@@ -12,12 +12,4 @@ RUN apk add --update \
COPY scripts /scripts COPY scripts /scripts
WORKDIR /scripts WORKDIR /scripts
CMD php deleteOldBranches.php && \ CMD php deleteOldBranches.php
helm repo add gitlab https://charts.gitlab.io/ && \ \ No newline at end of file
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
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