Validate docker

This commit is contained in:
Marco Santos
2024-11-27 12:25:20 +00:00
parent 0d2536da73
commit 67d355caa7

11
Jenkinsfile vendored
View File

@@ -24,6 +24,16 @@ pipeline {
} }
stages { stages {
stage('Validate Docker Connection') {
steps {
script {
echo "Validando conexão com Docker remoto: ${DOCKER_HOST}"
// Testa a conexão com o Docker remoto
sh 'docker info'
}
}
}
stage('Check for Changes') { stage('Check for Changes') {
steps { steps {
script { script {
@@ -125,6 +135,7 @@ pipeline {
post { post {
success { success {
echo 'Services deployed successfully!' echo 'Services deployed successfully!'
sh 'docker system prune -f'
} }
failure { failure {
echo 'Failed to deploy services. Check logs.' echo 'Failed to deploy services. Check logs.'