From dab09640a069747f4e98f4e87bd3feb96fd7e193 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 23 Oct 2024 01:01:43 +0200 Subject: [PATCH] Adds running steps --- Jenkinsfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 03020bf..6af2d7f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,20 @@ pipeline { } } } + stage(('Prepare Docker Composer')) { + steps { + sh """ + sed 's|ogcore-php:static|${DOCKER_IDENTITY}|g; s|ogcore-nginx:static|${DOCKER_IDENTITY_NGINX}|g' ${DOCKER_COMPOSE_TEMPLATE} > ${DOCKER_COMPOSE_FILE} + """ + } + } + stage('Run containers') { + steps { + sh "docker compose -f ${DOCKER_COMPOSE_FILE} up -d" + sh "docker compose -f ${DOCKER_COMPOSE_FILE} ps" + sh "docker compose -f ${DOCKER_COMPOSE_FILE} down" + } + } stage ("Delete Image") { steps { script {