Merge branch 'release/v260425'
This commit is contained in:
@@ -54,4 +54,16 @@ runs:
|
|||||||
)
|
)
|
||||||
|
|
||||||
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||||
"APP_KEY=$(printf '%q' "$APP_KEY") AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") bash -se -c 'cd \"\$AUTO_DEPLOY_PATH\"; git checkout \"\$AUTO_DEPLOY_BRANCH\"; git pull --ff-only; git submodule sync --recursive; git submodule update --init --recursive; echo \"[remote] auto-deploy repo updated\"; ./common/deploy.sh abort-pending \"\$APP_KEY\"; echo \"[remote] \$APP_KEY pending deployment aborted\"'"
|
"APP_KEY=$(printf '%q' "$APP_KEY") \
|
||||||
|
AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") \
|
||||||
|
AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") \
|
||||||
|
bash -se" << 'EOF'
|
||||||
|
cd "$AUTO_DEPLOY_PATH"
|
||||||
|
git checkout "$AUTO_DEPLOY_BRANCH"
|
||||||
|
git pull --ff-only
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
echo "[remote] auto-deploy repo updated"
|
||||||
|
./common/deploy.sh abort-pending "$APP_KEY"
|
||||||
|
echo "[remote] $APP_KEY pending deployment aborted"
|
||||||
|
EOF
|
||||||
|
|||||||
@@ -54,4 +54,16 @@ runs:
|
|||||||
)
|
)
|
||||||
|
|
||||||
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||||
"APP_KEY=$(printf '%q' "$APP_KEY") AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") bash -se -c 'cd \"\$AUTO_DEPLOY_PATH\"; git checkout \"\$AUTO_DEPLOY_BRANCH\"; git pull --ff-only; git submodule sync --recursive; git submodule update --init --recursive; echo \"[remote] auto-deploy repo updated\"; ./common/deploy.sh finalize \"\$APP_KEY\"; echo \"[remote] \$APP_KEY deployment finalized\"'"
|
"APP_KEY=$(printf '%q' "$APP_KEY") \
|
||||||
|
AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") \
|
||||||
|
AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") \
|
||||||
|
bash -se" << 'EOF'
|
||||||
|
cd "$AUTO_DEPLOY_PATH"
|
||||||
|
git checkout "$AUTO_DEPLOY_BRANCH"
|
||||||
|
git pull --ff-only
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
echo "[remote] auto-deploy repo updated"
|
||||||
|
./common/deploy.sh finalize "$APP_KEY"
|
||||||
|
echo "[remote] $APP_KEY deployment finalized"
|
||||||
|
EOF
|
||||||
|
|||||||
@@ -71,4 +71,24 @@ runs:
|
|||||||
)
|
)
|
||||||
|
|
||||||
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||||
"APP_KEY=$(printf '%q' "$APP_KEY") IMAGE_TAG=$(printf '%q' "$IMAGE_TAG") HARBOR_USER=$(printf '%q' "$HARBOR_USER") HARBOR_SECRET=$(printf '%q' "$HARBOR_SECRET") HARBOR_HOST=$(printf '%q' "$HARBOR_HOST") AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") bash -se -c 'printf \"%s\" \"\$HARBOR_SECRET\" | sudo /usr/bin/docker login \"\$HARBOR_HOST\" -u \"\$HARBOR_USER\" --password-stdin; echo \"[remote] Harbor login succeeded\"; cd \"\$AUTO_DEPLOY_PATH\"; git checkout \"\$AUTO_DEPLOY_BRANCH\"; git pull --ff-only; git submodule sync --recursive; git submodule update --init --recursive; echo \"[remote] auto-deploy repo updated\"; ./common/deploy.sh deploy \"\$APP_KEY\" \"\$IMAGE_TAG\"; echo \"[remote] \$APP_KEY deploy staged with IMAGE_TAG=\$IMAGE_TAG\"; echo \"[remote] current deployment status:\"; ./common/deploy.sh status \"\$APP_KEY\" --format env'"
|
"APP_KEY=$(printf '%q' "$APP_KEY") \
|
||||||
|
IMAGE_TAG=$(printf '%q' "$IMAGE_TAG") \
|
||||||
|
HARBOR_USER=$(printf '%q' "$HARBOR_USER") \
|
||||||
|
HARBOR_SECRET=$(printf '%q' "$HARBOR_SECRET") \
|
||||||
|
HARBOR_HOST=$(printf '%q' "$HARBOR_HOST") \
|
||||||
|
AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") \
|
||||||
|
AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") \
|
||||||
|
bash -se" << 'EOF'
|
||||||
|
printf "%s" "$HARBOR_SECRET" | sudo /usr/bin/docker login "$HARBOR_HOST" -u "$HARBOR_USER" --password-stdin
|
||||||
|
echo "[remote] Harbor login succeeded"
|
||||||
|
cd "$AUTO_DEPLOY_PATH"
|
||||||
|
git checkout "$AUTO_DEPLOY_BRANCH"
|
||||||
|
git pull --ff-only
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
echo "[remote] auto-deploy repo updated"
|
||||||
|
./common/deploy.sh deploy "$APP_KEY" "$IMAGE_TAG"
|
||||||
|
echo "[remote] $APP_KEY deploy staged with IMAGE_TAG=$IMAGE_TAG"
|
||||||
|
echo "[remote] current deployment status:"
|
||||||
|
./common/deploy.sh status "$APP_KEY" --format env
|
||||||
|
EOF
|
||||||
|
|||||||
@@ -66,4 +66,19 @@ runs:
|
|||||||
)
|
)
|
||||||
|
|
||||||
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
ssh "${SSH_OPTS[@]}" "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||||
"APP_KEY=$(printf '%q' "$APP_KEY") APP_UPSTREAM_HOST=$(printf '%q' "$APP_UPSTREAM_HOST") PENDING_PORT=$(printf '%q' "$PENDING_PORT") PENDING_COLOR=$(printf '%q' "$PENDING_COLOR") AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") bash -se -c 'cd \"\$AUTO_DEPLOY_PATH\"; git checkout \"\$AUTO_DEPLOY_BRANCH\"; git pull --ff-only; git submodule sync --recursive; git submodule update --init --recursive; echo \"[remote] auto-deploy repo updated on nginx server\"; ./common/nginx/manage-nginx.sh switch \"\$APP_KEY\" \"\$APP_UPSTREAM_HOST\" \"\$PENDING_PORT\"; echo \"[remote] nginx switched \$APP_KEY to \$APP_UPSTREAM_HOST:\$PENDING_PORT (\$PENDING_COLOR)\"'"
|
"APP_KEY=$(printf '%q' "$APP_KEY") \
|
||||||
|
APP_UPSTREAM_HOST=$(printf '%q' "$APP_UPSTREAM_HOST") \
|
||||||
|
PENDING_PORT=$(printf '%q' "$PENDING_PORT") \
|
||||||
|
PENDING_COLOR=$(printf '%q' "$PENDING_COLOR") \
|
||||||
|
AUTO_DEPLOY_PATH=$(printf '%q' "$AUTO_DEPLOY_PATH") \
|
||||||
|
AUTO_DEPLOY_BRANCH=$(printf '%q' "$AUTO_DEPLOY_BRANCH") \
|
||||||
|
bash -se" << 'EOF'
|
||||||
|
cd "$AUTO_DEPLOY_PATH"
|
||||||
|
git checkout "$AUTO_DEPLOY_BRANCH"
|
||||||
|
git pull --ff-only
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
echo "[remote] auto-deploy repo updated on nginx server"
|
||||||
|
./common/nginx/manage-nginx.sh switch "$APP_KEY" "$APP_UPSTREAM_HOST" "$PENDING_PORT"
|
||||||
|
echo "[remote] nginx switched $APP_KEY to $APP_UPSTREAM_HOST:$PENDING_PORT ($PENDING_COLOR)"
|
||||||
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user