Update Jenkinsfile
This commit is contained in:
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user