File tree Expand file tree Collapse file tree 7 files changed +15
-8
lines changed
Expand file tree Collapse file tree 7 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ outputs:
1111runs :
1212 using : composite
1313 steps :
14- - uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.10.3
14+ - uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.10.4
1515 - id : result
1616 shell : bash
1717 run : |
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ outputs:
1313runs :
1414 using : composite
1515 steps :
16- - uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.10.3
16+ - uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@0.10.4
1717 - id : matrix
1818 shell : bash
1919 run : |
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library
44inputs :
55 version :
66 description : GardenLinux Python library version
7- default : " 0.10.3 "
7+ default : " 0.10.4 "
88 python_version :
99 description : Python version to setup
1010 default : " 3.14"
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " gardenlinux"
3- version = " 0.10.3 "
3+ version = " 0.10.4 "
44description = " Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
55authors = [" Garden Linux Maintainers <contact@gardenlinux.io>" ]
66license = " Apache-2.0"
Original file line number Diff line number Diff line change 55"""
66
77import logging
8+ import re
89from configparser import UNNAMED_SECTION , ConfigParser
910from datetime import datetime
1011from hashlib import file_digest
@@ -189,6 +190,8 @@ def upload_from_directory(
189190 "paths" : [],
190191 }
191192
193+ re_object = re .compile ("[^a-zA-Z0-9\\ s+\\ -=.\\ _:/@]" )
194+
192195 for artifact in artifacts_dir .iterdir ():
193196 if not artifact .match (f"{ cname } *" ):
194197 continue
@@ -216,9 +219,9 @@ def upload_from_directory(
216219 }
217220
218221 s3_tags = {
219- "architecture" : cname_object .arch ,
220- "platform" : cname_object .platform ,
221- "version" : cname_object .version ,
222+ "architecture" : re_object . sub ( "+" , cname_object .arch ) ,
223+ "platform" : re_object . sub ( "+" , cname_object .platform ) ,
224+ "version" : re_object . sub ( "+" , cname_object .version ) ,
222225 "committish" : commit_hash ,
223226 "md5sum" : md5sum ,
224227 "sha256sum" : sha256sum ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class S3Env:
2222
2323
2424def make_cname (
25- flavor : str = "container" ,
25+ flavor : str = "kvm- container" ,
2626 arch : str = "amd64" ,
2727 version : str = "1234.1" ,
2828 commit : str = "abc123" ,
Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ def test_upload_from_directory_success(s3_setup):
120120 assert metadata ["require_uefi" ] is True
121121 assert metadata ["secureboot" ] is True
122122
123+ raw_tags_response = env .s3 .meta .client .get_object_tagging (Bucket = env .bucket_name , Key = f"objects/{ env .cname } /{ env .cname } -file1" )
124+ tags = { tag ['Key' ]: tag ['Value' ] for tag in raw_tags_response ["TagSet" ] }
125+ assert tags ["platform" ] == "kvm+container"
126+
123127
124128def test_upload_from_directory_with_delete (s3_setup ):
125129 """
You can’t perform that action at this time.
0 commit comments