Update Jenkinsfile
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@@ -57,12 +57,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Clean Old Container') {
|
stage('Clean Old Container') {
|
||||||
steps {
|
steps {
|
||||||
try {
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
sh 'docker stop otomai'
|
sh 'docker stop otomai'
|
||||||
sh 'docker rm -rf otomai'
|
sh 'docker rm otomai'
|
||||||
} catch (err) {
|
|
||||||
// Ignore the error if the container doesn't exist
|
|
||||||
echo "Container 'otomai' doesn't exist. Skipping."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user