Skip to content

Commit 3b50fd2

Browse files
committed
jobs/gc: add containers gc and update gc-policy
Update params to gc to take containers registry secret. Also, update the gc-policy.yaml to start containers pruning.
1 parent 1f4bbac commit 3b50fd2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
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: 7 additions & 2 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("""
65+
shwrap("""
6266
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
}

0 commit comments

Comments
 (0)