From ddde963d506715d3c2caaa58e6995ede4abbb2cc Mon Sep 17 00:00:00 2001 From: David Freeman Date: Fri, 18 Dec 2020 14:36:23 -0700 Subject: [PATCH 1/2] fix REPORT_TAR_NAME upload --- stages/publish/upload-to-s3-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/publish/upload-to-s3-run.sh b/stages/publish/upload-to-s3-run.sh index a64a7e4e..96ab9d78 100755 --- a/stages/publish/upload-to-s3-run.sh +++ b/stages/publish/upload-to-s3-run.sh @@ -52,4 +52,4 @@ done python3 "${PIPELINE_REPO_DIR}/stages/publish/s3_upload.py" --file "${PROJECT_README}" --bucket "${S3_REPORT_BUCKET}" --dest "${BASE_BUCKET_DIRECTORY}/${IMAGE_PATH}/${IMAGE_VERSION}/${REMOTE_REPORT_DIRECTORY}/${PROJECT_README}" python3 "${PIPELINE_REPO_DIR}/stages/publish/s3_upload.py" --file "${PROJECT_LICENSE}" --bucket "${S3_REPORT_BUCKET}" --dest "${BASE_BUCKET_DIRECTORY}/${IMAGE_PATH}/${IMAGE_VERSION}/${REMOTE_REPORT_DIRECTORY}/${PROJECT_LICENSE}" -python3 "${PIPELINE_REPO_DIR}/stages/publish/s3_upload.py" --file "${REPORT_TAR_NAME}" --bucket "${S3_REPORT_BUCKET}" --dest "${BASE_BUCKET_DIRECTORY}/${IMAGE_PATH}/${IMAGE_VERSION}/${REMOTE_REPORT_DIRECTORY}/${REPORT_TAR_NAME}-${IMAGE_VERSION}-reports-signature.tar.gz" +python3 "${PIPELINE_REPO_DIR}/stages/publish/s3_upload.py" --file "${REPORT_TAR_NAME}" --bucket "${S3_REPORT_BUCKET}" --dest "${BASE_BUCKET_DIRECTORY}/${IMAGE_PATH}/${IMAGE_VERSION}/${REMOTE_REPORT_DIRECTORY}/${REPORT_TAR_NAME}" -- GitLab From 341e1be1f73c32963061df2baabbdf831038f39d Mon Sep 17 00:00:00 2001 From: David Freeman Date: Fri, 18 Dec 2020 14:39:18 -0700 Subject: [PATCH 2/2] log status codes --- stages/publish/create_repo_map_default.py | 2 +- stages/publish/create_repo_map_other.py | 2 +- stages/publish/s3_upload.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stages/publish/create_repo_map_default.py b/stages/publish/create_repo_map_default.py index 15b2db1a..75bdea0a 100644 --- a/stages/publish/create_repo_map_default.py +++ b/stages/publish/create_repo_map_default.py @@ -26,7 +26,7 @@ def get_repomap(object_name, bucket="ironbank-pipeline-artifacts"): print(object_name) try: response = s3_client.download_file(bucket, object_name, "repo_map.json") - logging.debug(f"S3 download response: {response}") + logging.debug(f"S3 download response code: {response.status_code}") except ClientError as e: logging.error(e) print("Existing repo_map.json not found, creating new repo_map.json") diff --git a/stages/publish/create_repo_map_other.py b/stages/publish/create_repo_map_other.py index 3f105be3..accbf98b 100644 --- a/stages/publish/create_repo_map_other.py +++ b/stages/publish/create_repo_map_other.py @@ -26,7 +26,7 @@ def get_repomap(object_name, bucket="ironbank-pipeline-artifacts"): print(object_name) try: response = s3_client.download_file(bucket, object_name, "repo_map.json") - logging.debug(f"S3 download response: {response}") + logging.debug(f"S3 download response code: {response.status_code}") except ClientError as e: logging.error(e) print("Existing repo_map.json not found, creating new repo_map.json") diff --git a/stages/publish/s3_upload.py b/stages/publish/s3_upload.py index 02959b03..6ac95ee9 100644 --- a/stages/publish/s3_upload.py +++ b/stages/publish/s3_upload.py @@ -61,7 +61,7 @@ def upload_file(file_name, bucket, object_name=None): ) try: response = s3_client.upload_file(file_name, bucket, object_name, extra_args) - logging.debug(f"S3 upload response: {response}") + logging.debug(f"S3 upload response code: {response.status_code}") except ClientError as e: logging.error(e) return False -- GitLab