added jenkins deployment

This commit is contained in:
2025-12-10 15:18:09 -05:00
parent ad5a43310f
commit 80314380cc
Vendored
+5 -4
View File
@@ -36,10 +36,6 @@ pipeline {
stage('Deploy') {
steps {
echo 'Cleaning up and creating network...'
sh "docker network rm -f ${NETWORK_NAME} || true"
sh "docker network create ${NETWORK_NAME}"
echo 'Stopping and removing old containers...'
// 1. Stop and remove the old running containers (if they exist)
// The || true prevents the build from failing if the container doesn't exist yet
@@ -48,6 +44,11 @@ pipeline {
sh "docker stop ${FLASK_CONTAINER_NAME} || true"
sh "docker rm ${FLASK_CONTAINER_NAME} || true"
echo 'Cleaning up and creating network...'
sh "docker network rm -f ${NETWORK_NAME} || true"
sh "docker network create ${NETWORK_NAME}"
echo "Starting new containers named ${VUE_CONTAINER_NAME} and ${FLASK_CONTAINER_NAME}... from images ${FRONTEND_IMAGE} and ${BACKEND_IMAGE}"
// 2. Start the newly built images