[📝] Jenkins 수정
Some checks failed
AcaMate-API/pipeline/head There was a failure building this commit

This commit is contained in:
김선규 2024-11-04 17:53:54 +09:00
parent 893c8d8820
commit 877ec7d232

10
Jenkinsfile vendored
View File

@ -9,7 +9,7 @@ pipeline {
stages {
stage('Clone Repository') {
steps {
git url: 'https://git.ipstein.myds.me/AcaMate/AcaMate_Web.git', branch: env.GIT_BRANCH
git url: 'https://git.ipstein.myds.me/AcaMate/AcaMate_API.git', branch: env.BRANCH_NAME
}
}
stage('Deploy') {
@ -19,19 +19,19 @@ pipeline {
// main 브랜치용 작업
def containerId = sh(script: "docker ps -qf 'name=${DOCKER_RELEASE_CONTAINER}'", returnStdout: true).trim()
if (containerId) {
sh "docker cp ${WORKSPACE}/. ${containerId}:${APP_VOLUME_FRONT}"
sh "docker cp ${WORKSPACE}/. ${containerId}:${APP_VOLUME}"
sh "docker start ${containerId}"
} else {
error "Docker container ${DOCKER_CONTAINER_NAME} not found"
error "Docker container ${DOCKER_RELEASE_CONTAINER} not found"
}
} else if (env.GIT_BRANCH == 'debug') {
// debug 브랜치용 작업
def containerId = sh(script: "docker ps -qf 'name=${DOCKER_DEBUG_CONTAINER}'", returnStdout: true).trim()
if (containerId) {
sh "docker cp ${WORKSPACE}/. ${containerId}:${APP_VOLUME_FRONT}"
sh "docker cp ${WORKSPACE}/. ${containerId}:${APP_VOLUME}"
sh "docker start ${containerId}"
} else {
error "Docker container ${DOCKER_CONTAINER_NAME} not found"
error "Docker container ${DOCKER_DEBUG_CONTAINER} not found"
}
}
}