[api] Jenkinsfile.pjt

- 컴포즈 복사
This commit is contained in:
2026-02-03 16:23:49 +09:00
parent f87828b4e5
commit 18eb159f26
+25
View File
@@ -11,6 +11,17 @@ pipeline {
REGISTRY_HOST = "registry.pjt.kr" REGISTRY_HOST = "registry.pjt.kr"
IMAGE_REPO = "alist/api" IMAGE_REPO = "alist/api"
DOCKER_CRED = "registry-pjt" DOCKER_CRED = "registry-pjt"
// ===== api ssh =====
SSH_HOST = "121.160.234.222"
SSH_PORT = "2001"
SSH_USER = "bigfuntnp"
SSH_COMPOSE_DIR = "/srv/project/alist/compose"
SSH_COMPOSE_FILE = "api-compose.pjt.yml"
// ===== jenkins workspace path =====
WORK_COMPOSE_DIR = "deploy/pjt/compose/"
WORK_COMPOSE_FILE = "api-compose.pjt.yml"
} }
stages { stages {
@@ -70,5 +81,19 @@ pipeline {
} }
} }
} }
stage('6) Copy compose') {
steps {
sshagent(['ssh-pjt']) {
sh '''
set -e
SRC="${WORK_COMPOSE_DIR}/${WORK_COMPOSE_FILE}"
DST="${SSH_USER}@${SSH_HOST}:${SSH_COMPOSE_DIR}/${SSH_COMPOSE_FILE}"
scp -P ${SSH_PORT} -o StrictHostKeyChecking=no "$SRC" "$DST"
'''
}
}
}
} }
} }