Skip to content

Commit c811983

Browse files
committed
make suffix in s3 artifact manifest not contain cname
to parse this correctly in GLCI
1 parent 3fbd5cb commit c811983

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/gardenlinux/s3/s3_artifacts.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,16 @@ def upload_from_directory(
169169
md5sum = file_digest(fp, "md5").hexdigest()
170170
sha256sum = file_digest(fp, "sha256").hexdigest()
171171

172+
if artifact.name.startswith(cname):
173+
suffix = artifact.name[len(cname):]
174+
else:
175+
raise RuntimeError(f"Artifact name '{artifact.name}' does not start with cname '{cname}'")
176+
172177
artifact_metadata = {
173178
"name": artifact.name,
174179
"s3_bucket_name": self._bucket.name,
175180
"s3_key": s3_key,
176-
"suffix": "".join(artifact.suffixes),
181+
"suffix": suffix,
177182
"md5sum": md5sum,
178183
"sha256sum": sha256sum,
179184
}

0 commit comments

Comments
 (0)