очистка от неиспользуемых образов
Hedgehog_server_CI/ServerMonitorBot/pipeline/head There was a failure building this commit Details
Hedgehog_server_CD/ServerMonitorBot/pipeline/head This commit looks good Details

pull/31/head
L_DelOff 2023-11-21 13:47:06 +03:00
parent 35a8d6a8c7
commit de303fcd8e
2 changed files with 12 additions and 2 deletions

View File

@ -43,7 +43,9 @@ pipeline {
}
stage('Prune images') {
steps {
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
sh """
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
"""
}
}
}

View File

@ -5,6 +5,12 @@ pipeline {
args '-v /root/.m2:/root/.m2'
}
}
environment {
SSH_HOST = credentials('SSH_HOST')
SSH_PORT = credentials('SSH_PORT')
SSH_USER = credentials('SSH_USER')
SSH_PASS = credentials('SSH_PASS')
}
stages {
stage('Build') {
steps {
@ -14,7 +20,9 @@ pipeline {
}
stage('Prune images') {
steps {
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
sh """
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
"""
}
}
}