Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23.3 CI/CD: Fix SignRelease job #368

Merged
merged 2 commits into from
Feb 9, 2024
Merged
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
9 changes: 5 additions & 4 deletions tests/ci/sign_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pr_info import PRInfo
from build_download_helper import download_builds_filter
import hashlib
from pathlib import Path

GPG_BINARY_SIGNING_KEY = os.getenv("GPG_BINARY_SIGNING_KEY")
GPG_BINARY_SIGNING_PASSPHRASE = os.getenv("GPG_BINARY_SIGNING_PASSPHRASE")
Expand Down Expand Up @@ -57,9 +58,9 @@ def main():

s3_helper = S3Helper()

s3_path_prefix = f"{pr_info.number}/{pr_info.sha}/" + CHECK_NAME.lower().replace(
s3_path_prefix = Path(f"{pr_info.number}/{pr_info.sha}/" + CHECK_NAME.lower().replace(
" ", "_"
).replace("(", "_").replace(")", "_").replace(",", "_")
).replace("(", "_").replace(")", "_").replace(",", "_"))

# downloads `package_release` artifacts generated
download_builds_filter(CHECK_NAME, reports_path, TEMP_PATH)
Expand All @@ -68,8 +69,8 @@ def main():
full_path = os.path.join(TEMP_PATH, f)
hashed_file_path = hash_file(full_path)
signed_file_path = sign_file(hashed_file_path)
s3_path = f'{s3_path_prefix}/{os.path.basename(signed_file_path)}'
s3_helper.upload_build_file_to_s3(signed_file_path, s3_path)
s3_path = s3_path_prefix / os.path.basename(signed_file_path)
s3_helper.upload_build_file_to_s3(Path(signed_file_path), str(s3_path))
print(f'Uploaded file {signed_file_path} to {s3_path}')

# Signed hashes are:
Expand Down
Loading