Skip to content

Commit

Permalink
Merge pull request #368 from Altinity/23.3_CI_CD_fix_SignRelease
Browse files Browse the repository at this point in the history
23.3 CI/CD: Fix SignRelease job
  • Loading branch information
Enmk authored Feb 9, 2024
2 parents 584b39f + f2e7646 commit 643f2c9
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 643f2c9

Please sign in to comment.