Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gitlab GC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Hebeler
Gitlab GC
Commits
771b46cd
Commit
771b46cd
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
added registry gc
parent
3191638a
Branches
7-fix-deprecated-classes-in-updater
No related tags found
No related merge requests found
Pipeline
#4016
passed
4 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+8
-1
8 additions, 1 deletion
Dockerfile
with
8 additions
and
1 deletion
Dockerfile
+
8
−
1
View file @
771b46cd
...
...
@@ -2,6 +2,7 @@ FROM dtzar/helm-kubectl
RUN
apk add
--update
\
curl
\
jq
\
php7-cli
\
php7-curl
\
php7-json
\
...
...
@@ -11,4 +12,10 @@ RUN apk add --update \
COPY
scripts /scripts
WORKDIR
/scripts
CMD
php deleteOldBranches.php
\ No newline at end of file
CMD
php deleteOldBranches.php && \
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment