From 8df8f016508e64834e3eb41ad8679fef162b2161 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 14 Sep 2023 20:33:36 +0000 Subject: [PATCH 1/2] Fix deploy ecr script --- build-system/scripts/deploy_ecr | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build-system/scripts/deploy_ecr b/build-system/scripts/deploy_ecr index 2fb0cd2fbe7..d8469733069 100755 --- a/build-system/scripts/deploy_ecr +++ b/build-system/scripts/deploy_ecr @@ -18,15 +18,21 @@ retry ensure_repo $REPOSITORY $ECR_DEPLOY_REGION # Push image to deployment repo with commit hash tag and optional architecture e.g: # falafel:deadbeefcafebabe1337c0de-x86_64 IMAGE_DEPLOY_COMMIT_URI=$ECR_DEPLOY_URL/$REPOSITORY:$COMMIT_HASH +CURRENT_TAG=$COMMIT_HASH +NEW_TAG_COMMIT_TAG=$PROJECT-$COMMIT_TAG +NEW_TAG_DEPLOY_TAG=$DEPLOY_TAG if [[ -n "$ARCH" ]]; then IMAGE_DEPLOY_COMMIT_URI=$IMAGE_DEPLOY_COMMIT_URI-$ARCH + CURRENT_TAG=$CURRENT_TAG-$ARCH + NEW_TAG_COMMIT_TAG=$NEW_TAG_COMMIT_TAG-$ARCH + NEW_TAG_DEPLOY_TAG=$NEW_TAG_DEPLOY_TAG-$ARCH fi retry docker tag $IMAGE_COMMIT_URI $IMAGE_DEPLOY_COMMIT_URI retry docker push $IMAGE_DEPLOY_COMMIT_URI # Tag image with full version if we have one. Allows deployment of precise image version if rollback needed. if [ -n "${COMMIT_TAG:-}" ]; then - retry tag_remote_image $REPOSITORY $COMMIT_HASH $PROJECT-$COMMIT_TAG $ECR_DEPLOY_REGION + retry tag_remote_image $REPOSITORY $CURRENT_TAG $NEW_TAG_COMMIT_TAG $ECR_DEPLOY_REGION fi -retry tag_remote_image $REPOSITORY $COMMIT_HASH $DEPLOY_TAG $ECR_DEPLOY_REGION +retry tag_remote_image $REPOSITORY $CURRENT_TAG $NEW_TAG_DEPLOY_TAG $ECR_DEPLOY_REGION From cbc82533c51bbce304333cfca5e30eb9d163a0d3 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 14 Sep 2023 20:38:23 +0000 Subject: [PATCH 2/2] Fixed deploy npm script --- build-system/scripts/deploy_npm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/scripts/deploy_npm b/build-system/scripts/deploy_npm index 8872e7e3e08..0ad35f4e212 100755 --- a/build-system/scripts/deploy_npm +++ b/build-system/scripts/deploy_npm @@ -9,7 +9,7 @@ readonly STANDALONE=${2:-} extract_repo $REPOSITORY /usr/src project -cd project/src/$(query_manifest projectDir $REPOSITORY) +cd $(query_manifest projectDir $REPOSITORY) echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc