Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): Attempt to fix deployments #2309

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build-system/scripts/deploy_ecr
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_npm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down