Update Jenkinsfile

This commit is contained in:
Tom Ruff
2024-10-05 12:56:01 +03:00
committed by GitHub
parent 36d8fea3ce
commit aa7f1a9955

7
Jenkinsfile vendored
View File

@@ -57,12 +57,9 @@ pipeline {
}
stage('Clean Old Container') {
steps {
try {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'docker stop otomai'
sh 'docker rm -rf otomai'
} catch (err) {
// Ignore the error if the container doesn't exist
echo "Container 'otomai' doesn't exist. Skipping."
sh 'docker rm otomai'
}
}
}