Update Jenkinsfile

This commit is contained in:
Tom Ruff
2024-10-05 12:53:41 +03:00
committed by GitHub
parent 224d9fa319
commit 36d8fea3ce

8
Jenkinsfile vendored
View File

@@ -55,11 +55,15 @@ pipeline {
} }
} }
} }
stage('Clean old container') { stage('Clean Old Container') {
steps { steps {
// Shell command to stop and kill the named container try {
sh 'docker stop otomai' sh 'docker stop otomai'
sh 'docker rm -rf otomai' sh 'docker rm -rf otomai'
} catch (err) {
// Ignore the error if the container doesn't exist
echo "Container 'otomai' doesn't exist. Skipping."
}
} }
} }
stage('Run new container') { stage('Run new container') {