Skip to content

Commit 0cda14e

Browse files
Fail if the artifacts are not found in staging bucket
1 parent 6a17d64 commit 0cda14e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ def download_artifacts_from_s3(release_version: str, commit_sha: str):
221221
logger.debug(f"ERROR: Failed to list or download from prefix '{s3_artifact_dir}'. S3 Client Error: {e}")
222222
return False
223223

224+
if download_count == 0:
225+
logger.info(f"Couldn't download artifacts from staging S3 bucket {STAGING_S3_BUCKET_NAME}, please verify that artifacts are available under dir: {commit_sha}")
226+
sys.exit(1)
227+
224228
logger.info("All the artifacts have been downloaded successfully.")
225229
return True
226230

0 commit comments

Comments
 (0)