Skip to contentSkip to conversation

ci: Add default for S3_BUCKET_URL

PATCH New Jan Kiszka 1 participant 1 message Aug 13, 2021

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v2 1/1 ci: Add default for S3_BUCKET_URL

From: Jan Kiszka <[email protected]>

This corresponds to the default for LAVA_ARTIFACTS_URL.

---

Changes in v2:
- reorder to fix failing consistency check before default was assigned

 scripts/deploy_to_aws.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/deploy_to_aws.sh +3 -3
index 9864cc1..e7c22f0 100755
@@ -18,13 +18,13 @@ if [ -z "${target}" ]; then
 fi
 images_dir=build/tmp/deploy/images
 
-if [ -z "${S3_BUCKET_URL}" ] || [ -z "${AWS_ACCESS_KEY_ID}" ]  || [ -z "${AWS_SECRET_ACCESS_KEY}" ]; then
+destination="${S3_BUCKET_URL:-s3://xenomai-images-artifacts/artifacts}"
+
+if [ -z "${destination}" ] || [ -z "${AWS_ACCESS_KEY_ID}" ]  || [ -z "${AWS_SECRET_ACCESS_KEY}" ]; then
     echo "environment not available or incomplete - do not deploy"
     exit 0
 fi
 
-destination="${S3_BUCKET_URL}"
-
 aws_args="--acl=public-read"
 
 isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}"
Signature · 1 line
2.31.1