Skip to content

Commit 06f205b

Browse files
authored
Merge pull request #1058 from gursewak1997/containers-add-gc
Add containers Garbage Collection.
2 parents 3e79eab + 3b50fd2 commit 06f205b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

gc-policy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
testing-devel:
22
cloud-uploads: 2y
3+
containers: 2w
34
next-devel:
45
cloud-uploads: 2y
6+
containers: 2w
57
branched:
68
cloud-uploads: 1y
9+
containers: 2w
710
rawhide:
811
cloud-uploads: 1y
12+
containers: 2w
913
bodhi-updates:
1014
cloud-uploads: 1y
1115
images: 58m

jobs/garbage-collection.Jenkinsfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ lock(resource: "gc-${params.STREAM}") {
5656
def originalTimestamp = originalBuildsJson.timestamp
5757
def acl = pipecfg.s3.acl ?: 'public-read'
5858

59-
withCredentials([file(variable: 'GCP_KOLA_TESTS_CONFIG', credentialsId: 'gcp-image-upload-config')]) {
59+
withCredentials([
60+
file(variable: 'GCP_KOLA_TESTS_CONFIG', credentialsId: 'gcp-image-upload-config'),
61+
file(variable: 'REGISTRY_SECRET', credentialsId: 'oscontainer-push-registry-secret'),
62+
file(variable: 'AWS_BUILD_UPLOAD_CONFIG', credentialsId: 'aws-build-upload-config')
63+
]) {
6064
stage('Garbage Collection') {
61-
pipeutils.shwrapWithAWSBuildUploadCredentials("""
62-
cosa cloud-prune --policy ${new_gc_policy_path} \
65+
shwrap("""
66+
cosa coreos-prune --policy ${new_gc_policy_path} \
6367
--stream ${params.STREAM} ${dry_run} \
6468
--gcp-json-key=\${GCP_KOLA_TESTS_CONFIG} \
6569
--acl=${acl} \
70+
--registry-auth-file=\${REGISTRY_SECRET} \
6671
--aws-config-file \${AWS_BUILD_UPLOAD_CONFIG}
6772
""")
6873
}
@@ -79,7 +84,7 @@ lock(resource: "gc-${params.STREAM}") {
7984
lock(resource: "builds-json-${params.STREAM}") {
8085
stage('Upload Builds JSON') {
8186
pipeutils.shwrapWithAWSBuildUploadCredentials("""
82-
cosa cloud-prune --policy ${new_gc_policy_path} \
87+
cosa coreos-prune --policy ${new_gc_policy_path} \
8388
--stream ${params.STREAM} \
8489
--upload-builds-json ${dry_run} \
8590
--acl=${acl} \

0 commit comments

Comments
 (0)