Skip to content

Commit

Permalink
gc-policy: prune containers
Browse files Browse the repository at this point in the history
Pruning dev streams after 2 weeks and stable streams after 2 months as
decided in
coreos/fedora-coreos-tracker#1367 (comment)
  • Loading branch information
jbtrystram committed Oct 1, 2024
1 parent 94a7d95 commit a72aea8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 12 additions & 0 deletions gc-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
branched:
containers: 2w
cloud-uploads: 1y
rawhide:
containers: 2w
cloud-uploads: 1y
bodhi-updates:
cloud-uploads: 1y
testing-devel:
containers: 2w
next-devel:
containers: 2w
next:
containers: 2m
testing:
containers: 2m
stable:
containers: 2m
7 changes: 3 additions & 4 deletions jobs/garbage-collection.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ lock(resource: "gc-${params.STREAM}") {

// containers tags and cloud artifacts can be GCed in parallel
def parallelruns = [:]
parallelruns['Cloud artifacts'] {
parallelruns['Cloud artifacts'] = {
withCredentials([file(variable: 'GCP_KOLA_TESTS_CONFIG', credentialsId: 'gcp-image-upload-config')]) {
stage('Cloud artifacts GC') {
pipeutils.shwrapWithAWSBuildUploadCredentials("""
Expand Down Expand Up @@ -90,14 +90,13 @@ lock(resource: "gc-${params.STREAM}") {
}
}
}
parallelruns['Container tags'] {
parallelruns['Container tags'] = {
// get repo url from pipecfg
def registry = pipecfg.registry_repos.oscontainer.repo
pipecfg, params.STREAM, params.VERSION)
withCredentials([file(variable: 'REGISTRY_SECRET',
credentialsId: 'oscontainer-push-registry-secret')]) {
pipeutils.shwrap("""
cosa container-prune --policy ${new_gc_policy_path} \
cosa container-prune --policy ${new_gc_policy_path} \
--registry-auth-file=\${REGISTRY_SECRET} \
--stream ${params.STREAM} ${dry_run} \
${registry}
Expand Down

0 comments on commit a72aea8

Please sign in to comment.