fix: post-receive Jenkins 트리거가 .env 자격증명을 로드

hook 환경에서도 Mobile/Desktop 빌드가 큐에 등록되도록 WORK_TREE .env를
읽고, APK 빌드 시 root npm ci를 보장한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 16:45:29 +09:00
parent c39a7c0b0c
commit 784201b834
3 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ log "google-services.json 확인"
if [[ ! -d "$ROOT/node_modules/vite" ]]; then
log "npm ci (root dependencies)"
(cd "$ROOT" && npm ci --ignore-scripts 2>/dev/null || npm install)
(cd "$ROOT" && npm ci)
fi
log "cap:sync"
+8
View File
@@ -2,6 +2,14 @@
# Git push(main) 후 Jenkins goldenChart-Desktop-Pipeline 트리거
set -euo pipefail
WORK_TREE="${WORK_TREE:-/Users/aidev/apps/goldenChart}"
if [[ -f "$WORK_TREE/.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$WORK_TREE/.env"
set +a
fi
JENKINS_URL="${JENKINS_URL:-${GC_DESKTOP_JENKINS_URL:-http://127.0.0.1:8090}}"
JENKINS_JOB="${JENKINS_JOB:-${GC_DESKTOP_JENKINS_JOB:-goldenChart-Desktop-Pipeline}}"
JENKINS_USER="${JENKINS_USER:-${GC_DESKTOP_JENKINS_USER:-}}"
+8
View File
@@ -2,6 +2,14 @@
# Git push(main) 후 Jenkins goldenChart-Mobile-Pipeline 트리거
set -euo pipefail
WORK_TREE="${WORK_TREE:-/Users/aidev/apps/goldenChart}"
if [[ -f "$WORK_TREE/.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$WORK_TREE/.env"
set +a
fi
JENKINS_URL="${JENKINS_URL:-${GC_MOBILE_JENKINS_URL:-http://127.0.0.1:8090}}"
JENKINS_JOB="${JENKINS_JOB:-${GC_MOBILE_JENKINS_JOB:-goldenChart-Mobile-Pipeline}}"
JENKINS_USER="${JENKINS_USER:-${GC_MOBILE_JENKINS_USER:-}}"