--progress 제거. report 생성은 체크해야함.
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "Refreshing mirror repos on 172.16.10.191 ..."
|
||||
ssh engdev@172.16.10.191 'set -euo pipefail; export GIT_PROGRESS_DELAY=0 GIT_FLUSH=1; shopt -s nullglob; for repo in *.git; do [ -d "${repo}" ] || continue; echo "Updating ${repo}"; (cd "${repo}" && git fetch --progress --prune --prune-tags origin "+refs/*:refs/*"); done'
|
||||
ssh engdev@172.16.10.191 'set -euo pipefail; shopt -s nullglob; for repo in *.git; do [ -d "${repo}" ] || continue; echo "Updating ${repo}"; (cd "${repo}" && git fetch --prune --prune-tags origin "+refs/*:refs/*"); done'
|
||||
|
||||
- name: Backup Branches (pre-scan → decision → execution)
|
||||
continue-on-error: true
|
||||
@@ -53,8 +53,6 @@ jobs:
|
||||
NOTIFY_WEBHOOK="${NOTIFY_WEBHOOK:-}"
|
||||
SYNC_TAGS="${SYNC_TAGS:-true}"
|
||||
TARGET_SEED_DEPTH="${TARGET_SEED_DEPTH:-50}"
|
||||
export GIT_PROGRESS_DELAY=0
|
||||
export GIT_FLUSH=1
|
||||
if ! [[ "${TARGET_SEED_DEPTH}" =~ ^[0-9]+$ ]] || (( TARGET_SEED_DEPTH <= 0 )); then
|
||||
echo "::warning::TARGET_SEED_DEPTH(${TARGET_SEED_DEPTH}) is invalid; resetting to 50"
|
||||
TARGET_SEED_DEPTH=50
|
||||
@@ -253,13 +251,13 @@ jobs:
|
||||
local source_repo="$1" cache_dir="${CACHE_BASE}/${source_repo//\//_}.git"
|
||||
if [[ ! -d "${cache_dir}" ]]; then
|
||||
echo "Initializing local cache for ${source_repo} at ${cache_dir}"
|
||||
if ! git clone --progress --mirror "${SOURCE_SSH_HOST}:${source_repo}" "${cache_dir}"; then
|
||||
if ! git clone --mirror "${SOURCE_SSH_HOST}:${source_repo}" "${cache_dir}"; then
|
||||
echo "::warning::Failed to clone cache for ${source_repo} (${SOURCE_SSH_HOST}:${source_repo})"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "Refreshing cache for ${source_repo}"
|
||||
if ! git -C "${cache_dir}" fetch --progress --prune --prune-tags origin "+refs/*:refs/*"; then
|
||||
if ! git -C "${cache_dir}" fetch --prune --prune-tags origin "+refs/*:refs/*"; then
|
||||
echo "::warning::Failed to refresh cache for ${source_repo} (${SOURCE_SSH_HOST}:${source_repo})"
|
||||
return 1
|
||||
fi
|
||||
@@ -485,7 +483,7 @@ jobs:
|
||||
prep_elapsed=$(( $(date +%s) - start_epoch ))
|
||||
echo "Prep completed in ${prep_elapsed}s. Fetching latest branch '${branch_name}' from source ${FETCH_REMOTE} ..."
|
||||
FETCH_LOG="${CLONE_DIR}/fetch_shallow.log"
|
||||
if ! git fetch --progress --no-tags "${shallow_exclude_args[@]}" source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FETCH_LOG}" >&2); then
|
||||
if ! git fetch --no-tags "${shallow_exclude_args[@]}" source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FETCH_LOG}" >&2); then
|
||||
if [[ "${#shallow_exclude_args[@]}" -gt 0 ]]; then
|
||||
echo "::warning::shallow-exclude fetch failed (likely unsupported). Log: ${FETCH_LOG}"
|
||||
if [[ -s "${FETCH_LOG}" ]]; then
|
||||
@@ -494,10 +492,10 @@ jobs:
|
||||
fi
|
||||
echo "[fallback] Seeding target main depth=${TARGET_SEED_DEPTH} then retrying full fetch without shallow-exclude"
|
||||
SEED_LOG="${CLONE_DIR}/fetch_seed.log"
|
||||
git fetch --progress --no-tags --depth="${TARGET_SEED_DEPTH}" origin "refs/heads/main:refs/heads/main" 2> >(tee "${SEED_LOG}" >&2) || echo "::warning::Seeding from target main skipped (fetch failed or branch missing)"
|
||||
git fetch --no-tags --depth="${TARGET_SEED_DEPTH}" origin "refs/heads/main:refs/heads/main" 2> >(tee "${SEED_LOG}" >&2) || echo "::warning::Seeding from target main skipped (fetch failed or branch missing)"
|
||||
backup_mode="증분 백업 (폴백: shallow-exclude 미지원)"
|
||||
FULL_FETCH_LOG="${CLONE_DIR}/fetch_full.log"
|
||||
if ! git fetch --progress --no-tags source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FULL_FETCH_LOG}" >&2); then
|
||||
if ! git fetch --no-tags source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FULL_FETCH_LOG}" >&2); then
|
||||
if [[ -s "${SEED_LOG:-}" ]]; then
|
||||
echo "[seed stderr tail]"
|
||||
tail -n 40 "${SEED_LOG}"
|
||||
@@ -527,7 +525,7 @@ jobs:
|
||||
|
||||
if [[ "${SYNC_TAGS}" == "true" ]]; then
|
||||
echo "Fetching tags from source..."
|
||||
if ! git fetch --progress --prune --prune-tags --no-tags source "refs/tags/*:refs/tags/*"; then
|
||||
if ! git fetch --prune --prune-tags --no-tags source "refs/tags/*:refs/tags/*"; then
|
||||
echo "::error::Failed to fetch tags from source repo"
|
||||
notify_status "error" "${repo_name}" "${branch_name}" "${backup_mode}" "${start_epoch}" "tag fetch 오류" "${heads_detail}"
|
||||
exec_end_epoch=$(date +%s)
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "Refreshing mirror repos on 172.16.10.191 ..."
|
||||
ssh engdev@172.16.10.191 'set -euo pipefail; export GIT_PROGRESS_DELAY=0 GIT_FLUSH=1; shopt -s nullglob; for repo in *.git; do [ -d "${repo}" ] || continue; echo "Updating ${repo}"; (cd "${repo}" && git fetch --progress --prune --prune-tags origin "+refs/*:refs/*"); done'
|
||||
ssh engdev@172.16.10.191 'set -euo pipefail; shopt -s nullglob; for repo in *.git; do [ -d "${repo}" ] || continue; echo "Updating ${repo}"; (cd "${repo}" && git fetch --prune --prune-tags origin "+refs/*:refs/*"); done'
|
||||
|
||||
- name: Mirror Branches
|
||||
env:
|
||||
@@ -41,8 +41,6 @@ jobs:
|
||||
SYNC_TAGS: ${{ vars.SYNC_TAGS }} # Optional, "false" to skip tag sync
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export GIT_PROGRESS_DELAY=0
|
||||
export GIT_FLUSH=1
|
||||
|
||||
CENTER_ORG="center_dev"
|
||||
AUTH_HEADER="Authorization: token ${BASE_GITEA_TOKEN}"
|
||||
@@ -299,7 +297,7 @@ jobs:
|
||||
prep_elapsed=$(( $(date +%s) - start_epoch ))
|
||||
echo "Prep completed in ${prep_elapsed}s. Fetching latest branch '${branch_name}' from source ${FETCH_REMOTE} ..."
|
||||
FETCH_LOG="${CLONE_DIR}/fetch_shallow.log"
|
||||
if ! git fetch --progress --no-tags "${shallow_exclude_args[@]}" source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FETCH_LOG}" >&2); then
|
||||
if ! git fetch --no-tags "${shallow_exclude_args[@]}" source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FETCH_LOG}" >&2); then
|
||||
if [[ "${#shallow_exclude_args[@]}" -gt 0 ]]; then
|
||||
echo "::warning::shallow-exclude fetch failed (likely unsupported). Log: ${FETCH_LOG}"
|
||||
if [[ -s "${FETCH_LOG}" ]]; then
|
||||
@@ -308,10 +306,10 @@ jobs:
|
||||
fi
|
||||
echo "[fallback] Seeding target main depth=${TARGET_SEED_DEPTH} then retrying full fetch without shallow-exclude"
|
||||
SEED_LOG="${CLONE_DIR}/fetch_seed.log"
|
||||
git fetch --progress --no-tags --depth="${TARGET_SEED_DEPTH}" origin "refs/heads/main:refs/heads/main" 2> >(tee "${SEED_LOG}" >&2) || echo "::warning::Seeding from target main skipped (fetch failed or branch missing)"
|
||||
git fetch --no-tags --depth="${TARGET_SEED_DEPTH}" origin "refs/heads/main:refs/heads/main" 2> >(tee "${SEED_LOG}" >&2) || echo "::warning::Seeding from target main skipped (fetch failed or branch missing)"
|
||||
backup_mode="증분 업데이트 (폴백: shallow-exclude 미지원)"
|
||||
FULL_FETCH_LOG="${CLONE_DIR}/fetch_full.log"
|
||||
if ! git fetch --progress --no-tags source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FULL_FETCH_LOG}" >&2); then
|
||||
if ! git fetch --no-tags source "+refs/heads/${branch_name}:refs/heads/${branch_name}" 2> >(tee "${FULL_FETCH_LOG}" >&2); then
|
||||
if [[ -s "${SEED_LOG:-}" ]]; then
|
||||
echo "[seed stderr tail]"
|
||||
tail -n 40 "${SEED_LOG}"
|
||||
@@ -336,7 +334,7 @@ jobs:
|
||||
fi
|
||||
if [[ "${SYNC_TAGS}" == "true" ]]; then
|
||||
echo "Fetching tags from source..."
|
||||
if ! git fetch --progress --prune --prune-tags --no-tags source "refs/tags/*:refs/tags/*"; then
|
||||
if ! git fetch --prune --prune-tags --no-tags source "refs/tags/*:refs/tags/*"; then
|
||||
echo "::error::Failed to fetch tags from source repo"
|
||||
notify_status "error" "${repo_name}" "${branch_name}" "${backup_mode}" "${start_epoch}" "tag fetch 오류"
|
||||
cd "${ROOT_DIR}"
|
||||
Reference in New Issue
Block a user