fix bug container may not eixsts.

This commit is contained in:
Zheyuan Wu
2025-04-16 10:41:04 -05:00
parent c7901188d4
commit 3d2c3afcb8
2 changed files with 16 additions and 9 deletions

4
Jenkinsfile vendored
View File

@@ -31,9 +31,9 @@ pipeline {
steps {
echo "Deploying docker image ${registry}:v${version}.${env.BUILD_ID}"
echo "Stopping existing container"
sh 'docker stop notenextra'
sh 'docker stop notenextra || true'
echo "Removing existing container"
sh 'docker rm notenextra'
sh 'docker rm notenextra || true'
echo "Running new docker container"
sh 'docker run -d -p 13000:3000 --name notenextra ${registry}:v${version}.${env.BUILD_ID}'
}