очистка от неиспользуемых образов
This commit is contained in:
@@ -43,7 +43,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Prune images') {
|
stage('Prune images') {
|
||||||
steps {
|
steps {
|
||||||
|
sh """
|
||||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
|
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ pipeline {
|
|||||||
args '-v /root/.m2:/root/.m2'
|
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 {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
@@ -14,7 +20,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Prune images') {
|
stage('Prune images') {
|
||||||
steps {
|
steps {
|
||||||
|
sh """
|
||||||
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
|
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user