Skip to content

Commit

Permalink
gc-policy: prune containers for dev-streams after 2w
Browse files Browse the repository at this point in the history
Only targetting developpement streams for now so I can monitor and fix
issues if needed.

The 2 weeks policy for dev streams was decided in
coreos/fedora-coreos-tracker#1367 (comment)
  • Loading branch information
jbtrystram committed Sep 30, 2024
1 parent 94a7d95 commit ff5e453
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions gc-policy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
branched:
containers: 2w
cloud-uploads: 1y
rawhide:
containers: 2w
cloud-uploads: 1y
bodhi-updates:
cloud-uploads: 1y
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 ff5e453

Please sign in to comment.