Skip to content
Snippets Groups Projects
Verified Commit 64c68f22 authored by Yoran Hillion's avatar Yoran Hillion
Browse files

:hammer: Deploys files after Sentry release init and sourcemaps upload

parent a698d768
Branches
Tags
No related merge requests found
Pipeline #157050 failed with stages
in 11 seconds
......@@ -86,19 +86,11 @@ PROJECT_VERSION=$(git describe --always)
echo $(printf "$TEMPLATE" "$HOST" "$DISTANT_REPO" "$(whoami)" "$1" "$PROJECT_VERSION") > "${PROJECT}_info.json"
echo "🏗 Installing npm dependencies"
npm ci
echo "📦 Packaging stuff"
echo "📦 Packaging stuff"
# shellcheck source=/dev/null
. "${SOURCE_ENV_FILE}"
npm run build:$ENVIRONMENT
echo "🚀 Deploying files"
for i in "${TARGET[@]}"; do
echo "Scp files to $i"
ssh -q "$i" mkdir -p $DEST_PATH
echo "destination $DEST_PATH"
rsync -avzhe ssh --progress --delete "dist/" "$i:$DEST_PATH"
done
# SENTRY
# Sentry needs gitlab repository to be origin
......@@ -124,6 +116,14 @@ if [ "$USE_SENTRY" == true ]; then
sentry-cli sourcemaps upload -p "$PROJECT" -r "$PROJECT_VERSION" dist/assets
fi
echo "🚀 Deploying files"
for i in "${TARGET[@]}"; do
echo "Scp files to $i"
ssh -q "$i" mkdir -p $DEST_PATH
echo "destination $DEST_PATH"
rsync -avzhe ssh --progress --delete "dist/" "$i:$DEST_PATH"
done
# Clean working dir
cd .. && rm -rf "$WORKING_DIR"
echo "🎉 $PROJECT $PROJECT_VERSION successfully deployed"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment