Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library
inputs:
version:
description: GardenLinux Python library version
default: "0.10.12"
default: "0.10.13"
python_version:
description: Python version to setup
default: "3.13"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gardenlinux"
version = "0.10.12"
version = "0.10.13"
description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
authors = ["Garden Linux Maintainers <contact@gardenlinux.io>"]
license = "Apache-2.0"
Expand Down
13 changes: 4 additions & 9 deletions src/gardenlinux/s3/s3_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,12 @@ def upload_from_directory(
if commit_id_or_hash is None:
commit_id_or_hash = cname_object.commit_id

version_epoch = str(cname_object.version_epoch)

if version_epoch is None:
version_epoch = ""

metadata = {
"platform": cname_object.feature_set_platform,
"architecture": arch,
"base_image": None,
"build_committish": commit_id_or_hash,
"build_timestamp": datetime.fromtimestamp(release_timestamp).isoformat(),
"gardenlinux_epoch": version_epoch,
"logs": None,
"modifiers": feature_set_list,
"require_uefi": require_uefi,
Expand All @@ -193,6 +187,9 @@ def upload_from_directory(
"paths": [],
}

if cname_object.version_epoch is not None:
metadata["gardenlinux_epoch"] = cname_object.version_epoch

platform_variant = cname_object.platform_variant

if platform_variant is not None:
Expand All @@ -210,13 +207,11 @@ def upload_from_directory(
md5sum = file_digest(fp, "md5").hexdigest()
sha256sum = file_digest(fp, "sha256").hexdigest()

suffixes = "".join(artifact.name)[1 + base_name_length :]

artifact_metadata = {
"name": artifact.name,
"s3_bucket_name": self._bucket.name,
"s3_key": s3_key,
"suffix": re_object.sub("+", suffixes),
"suffix": re_object.sub("+", artifact.name[base_name_length:]),
"md5sum": md5sum,
"sha256sum": sha256sum,
}
Expand Down
4 changes: 2 additions & 2 deletions tests/s3/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
base_image: null
build_committish: abc123lo
build_timestamp: '{build_timestamp}'
gardenlinux_epoch: '1234'
logs: null
modifiers:
- _usi
Expand All @@ -33,7 +32,8 @@
- name: container-amd64-1234.1-abc123lo.release
s3_bucket_name: test-bucket
s3_key: objects/container-amd64-1234.1-abc123lo/container-amd64-1234.1-abc123lo.release
suffix: release
suffix: .release
md5sum: {md5sum}
sha256sum: {sha256sum}
gardenlinux_epoch: 1234
""".strip()