Skip to content

Commit 00a3ee6

Browse files
committed
Encode S3 aritfact metadata build_timestamp as YAML type timestamp
Signed-off-by: Tobias Wolf <wolf@b1-systems.de> On-behalf-of: SAP <tobias.wolf@sap.com>
1 parent d19ce49 commit 00a3ee6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/gardenlinux/s3/s3_artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def upload_from_directory(
174174
"architecture": arch,
175175
"base_image": None,
176176
"build_committish": commit_id_or_hash,
177-
"build_timestamp": datetime.fromtimestamp(release_timestamp).isoformat(),
177+
"build_timestamp": datetime.fromtimestamp(release_timestamp),
178178
"logs": None,
179179
"modifiers": feature_set_list,
180180
"require_uefi": require_uefi,

tests/s3/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
architecture: amd64
1717
base_image: null
1818
build_committish: abc123lo
19-
build_timestamp: '{build_timestamp}'
19+
build_timestamp: {build_timestamp}
2020
logs: null
2121
modifiers:
2222
- _usi

tests/s3/test_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def test_main_with_expected_result(
9696
result = capsys.readouterr().out.strip()
9797

9898
result = re.sub(
99-
"^(.*)build_timestamp\\: '.+'$",
100-
"\\1build_timestamp: '{build_timestamp}'",
99+
"^(.*)build_timestamp\\: .+$",
100+
"\\1build_timestamp: {build_timestamp}",
101101
result,
102102
flags=re.M,
103103
)

0 commit comments

Comments
 (0)