fix: mobile server deploy — Jenkins crumb, APK build deps

Jenkins 트리거에 cookie+crumb 세션을 사용하고, 서버 APK 빌드 시 root npm ci를
실행하며 server-setup 스크립트와 Mobile job 설치를 보완한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 16:39:42 +09:00
parent f34104b721
commit 7611146cbf
5 changed files with 97 additions and 14 deletions
+8 -6
View File
@@ -13,21 +13,23 @@ log() { echo "$(date '+%Y-%m-%d %H:%M:%S') $LOG_TAG $*"; }
JENKINS_URL="${JENKINS_URL%/}"
JOB_API="${JENKINS_URL}/job/${JENKINS_JOB// /%20}"
COOKIE_JAR="$(mktemp)"
trap 'rm -f "$COOKIE_JAR"' EXIT
curl_get() {
local auth=()
if [[ -n "$JENKINS_USER" && -n "$JENKINS_TOKEN" ]]; then
curl -sf -u "${JENKINS_USER}:${JENKINS_TOKEN}" "$@"
else
curl -sf "$@"
auth=(-u "${JENKINS_USER}:${JENKINS_TOKEN}")
fi
curl -sf "${auth[@]}" -c "$COOKIE_JAR" -b "$COOKIE_JAR" "$@"
}
curl_post() {
local auth=()
if [[ -n "$JENKINS_USER" && -n "$JENKINS_TOKEN" ]]; then
curl -sf -X POST -u "${JENKINS_USER}:${JENKINS_TOKEN}" "$@"
else
curl -sf -X POST "$@"
auth=(-u "${JENKINS_USER}:${JENKINS_TOKEN}")
fi
curl -sf "${auth[@]}" -c "$COOKIE_JAR" -b "$COOKIE_JAR" -X POST "$@"
}
log "Jenkins mobile build — $JENKINS_JOB @ $JENKINS_URL"