From 3d5a58dc1b5df6fe08aa58d42846e3cd78f133ff Mon Sep 17 00:00:00 2001 From: greenamber676 Date: Thu, 9 Jan 2025 20:18:48 -0500 Subject: [PATCH] addeded jenkins pipe --- Jenkinsfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1ebce07..29a0df5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,17 +2,16 @@ pipeline { agent any environment { - DOCKER_IMAGE_NODE = 'your-node-image:latest' - DOCKER_IMAGE_DJANGO = 'your-django-image:latest' - DOCKER_IMAGE_POSTGRES = 'postgres:latest' - DOCKER_COMPOSE_FILE = 'docker-compose.yml' + DOCKER_IMAGE_PGADMIN = 'dpage/pgadmin4:latest' + DOCKER_IMAGE_POSTGRES = 'postgres:16.6' + DOCKER_COMPOSE_FILE = 'podman-compose.yml' } stages { stage('Checkout') { steps { // Checkout the code from Gitea - git url: 'http://your-gitea-instance/your-repo.git', branch: 'main' + git url: 'http://gitea.domeitsolutions.com/2265959/p00003.git', branch: 'main' } } @@ -20,7 +19,7 @@ pipeline { steps { script { // Build Node.js application - sh 'docker build -t ${DOCKER_IMAGE_NODE} ./node-app' + echo 'step 1 - build reflex-react UI' } } } @@ -29,7 +28,7 @@ pipeline { steps { script { // Build Django application - sh 'docker build -t ${DOCKER_IMAGE_DJANGO} ./django-app' + echo 'step-1 build django-api' } } } @@ -38,7 +37,7 @@ pipeline { steps { script { // Run tests using Docker Compose - sh "docker-compose -f ${DOCKER_COMPOSE_FILE} up --abort-on-container-exit" + sh "podman-compose -f ${DOCKER_COMPOSE_FILE} up --abort-on-container-exit" } } } @@ -47,7 +46,7 @@ pipeline { steps { script { // Deploy using Docker Compose - sh "docker-compose -f ${DOCKER_COMPOSE_FILE} up -d" + sh "podman-compose -f ${DOCKER_COMPOSE_FILE} up -d" } } } @@ -57,7 +56,6 @@ pipeline { always { // Clean up Docker containers and images sh 'docker-compose -f ${DOCKER_COMPOSE_FILE} down' - sh "docker rmi ${DOCKER_IMAGE_NODE} ${DOCKER_IMAGE_DJANGO} || true" } } } \ No newline at end of file