added jenkins deployment
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -36,10 +36,6 @@ pipeline {
|
|||||||
|
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
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...'
|
echo 'Stopping and removing old containers...'
|
||||||
// 1. Stop and remove the old running containers (if they exist)
|
// 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
|
// 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 stop ${FLASK_CONTAINER_NAME} || true"
|
||||||
sh "docker rm ${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}"
|
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
|
// 2. Start the newly built images
|
||||||
|
|||||||
Reference in New Issue
Block a user