hotfix
Hedgehog_server_CD/ServerMonitorBot/pipeline/head There was a failure building this commit Details

pull/35/head
L_DelOff 2023-11-22 18:55:42 +03:00
parent 30772ec123
commit 74e5e2b017
1 changed files with 2 additions and 1 deletions

View File

@ -39,8 +39,9 @@ pipeline {
}
stage('Remove old image') {
steps {
def updatedImageName = "${IMAGE_NAME}-app"
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'
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image rm -f ${updatedImageName}:${IMAGE_VERSION} || true'
"""
}
}