Update jenkinsfile
This commit is contained in:
13
jenkinsfile
13
jenkinsfile
@@ -51,18 +51,19 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deployment') {
|
stage('Deployment') {
|
||||||
steps {
|
steps {
|
||||||
|
withEnv(["DOCKER_HOST=unix:///var/run/docker.sock"]) {
|
||||||
sh '''
|
sh '''
|
||||||
CONTAINERS=$(docker ps -a --filter "label=com.docker.compose.project=${COMPOSE_PROJECT}" -q || true)
|
cd gameovergne-app2 # si ton repo est dans ce dossier
|
||||||
if [ -n "$CONTAINERS" ]; then
|
|
||||||
docker rm -f $CONTAINERS
|
echo "=== Nettoyage de l'ancienne stack ==="
|
||||||
fi
|
docker-compose down -v || true
|
||||||
|
|
||||||
echo "=== (Re)création de la stack MySQL + Spring + Angular ==="
|
echo "=== (Re)création de la stack MySQL + Spring + Angular ==="
|
||||||
docker-compose up -d mysql spring angular
|
docker-compose up -d mysql spring angular
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user