Skip to content

Commit e812bf7

Browse files
authored
make suffix in s3 artifact manifest not contain cname (#137)
* make suffix in s3 artifact manifest not contain cname to parse this correctly in GLCI * github actions: bump default version to 0.8.3
1 parent 3fbd5cb commit e812bf7

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/actions/features_parse/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ outputs:
1111
runs:
1212
using: composite
1313
steps:
14-
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].2
14+
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].3
1515
- id: result
1616
shell: bash
1717
run: |

.github/actions/flavors_parse/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ outputs:
1313
runs:
1414
using: composite
1515
steps:
16-
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].2
16+
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].3
1717
- id: matrix
1818
shell: bash
1919
run: |

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Installs the given GardenLinux Python library
33
inputs:
44
version:
55
description: GardenLinux Python library version
6-
default: "0.8.2"
6+
default: "0.8.3"
77
runs:
88
using: composite
99
steps:

src/gardenlinux/s3/s3_artifacts.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,18 @@ 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(
176+
f"Artifact name '{artifact.name}' does not start with cname '{cname}'"
177+
)
178+
172179
artifact_metadata = {
173180
"name": artifact.name,
174181
"s3_bucket_name": self._bucket.name,
175182
"s3_key": s3_key,
176-
"suffix": "".join(artifact.suffixes),
183+
"suffix": suffix,
177184
"md5sum": md5sum,
178185
"sha256sum": sha256sum,
179186
}

0 commit comments

Comments
 (0)