Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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/features_parse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ outputs:
runs:
using: composite
steps:
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].3
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].4
- id: result
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/flavors_parse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outputs:
runs:
using: composite
steps:
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].3
- uses: gardenlinux/python-gardenlinux-lib/.github/actions/[email protected].4
- id: matrix
shell: bash
run: |
Expand Down
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.3"
default: "0.10.4"
python_version:
description: Python version to setup
default: "3.14"
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.3"
version = "0.10.4"
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 <[email protected]>"]
license = "Apache-2.0"
Expand Down
9 changes: 6 additions & 3 deletions src/gardenlinux/s3/s3_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import logging
import re
from configparser import UNNAMED_SECTION, ConfigParser
from datetime import datetime
from hashlib import file_digest
Expand Down Expand Up @@ -189,6 +190,8 @@ def upload_from_directory(
"paths": [],
}

re_object = re.compile("[^a-zA-Z0-9\\s+\\-=.\\_:/@]")

for artifact in artifacts_dir.iterdir():
if not artifact.match(f"{cname}*"):
continue
Expand Down Expand Up @@ -216,9 +219,9 @@ def upload_from_directory(
}

s3_tags = {
"architecture": cname_object.arch,
"platform": cname_object.platform,
"version": cname_object.version,
"architecture": re_object.sub("+", cname_object.arch),
"platform": re_object.sub("+", cname_object.platform),
"version": re_object.sub("+", cname_object.version),
"committish": commit_hash,
"md5sum": md5sum,
"sha256sum": sha256sum,
Expand Down
2 changes: 1 addition & 1 deletion tests/s3/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class S3Env:


def make_cname(
flavor: str = "container",
flavor: str = "kvm-container",
arch: str = "amd64",
version: str = "1234.1",
commit: str = "abc123",
Expand Down
4 changes: 4 additions & 0 deletions tests/s3/test_s3_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def test_upload_from_directory_success(s3_setup):
assert metadata["require_uefi"] is True
assert metadata["secureboot"] is True

raw_tags_response = env.s3.meta.client.get_object_tagging(Bucket=env.bucket_name, Key=f"objects/{env.cname}/{env.cname}-file1")
tags = { tag['Key']: tag['Value'] for tag in raw_tags_response["TagSet"] }
assert tags["platform"] == "container+kvm"


def test_upload_from_directory_with_delete(s3_setup):
"""
Expand Down
Loading