Merge pull request 'fix' (#33) from feature/task-30-docker into master
All checks were successful
Hedgehog_server_CD/ServerMonitorBot/pipeline/head This commit looks good
All checks were successful
Hedgehog_server_CD/ServerMonitorBot/pipeline/head This commit looks good
Reviewed-on: #33
This commit is contained in:
@@ -31,14 +31,18 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Stop container') {
|
||||
sh """
|
||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'cd ${PATH_TO_DEV_FOLDER} && docker compose down'
|
||||
"""
|
||||
steps {
|
||||
sh """
|
||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'cd ${PATH_TO_DEV_FOLDER} && docker compose down'
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Remove old image') {
|
||||
sh """
|
||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image rm -f ${IMAGE_NAME}:${IMAGE_VERSION} || true'
|
||||
"""
|
||||
steps {
|
||||
sh """
|
||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image rm -f ${IMAGE_NAME}:${IMAGE_VERSION} || true'
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
|
||||
Reference in New Issue
Block a user