addeded jenkins pipe
Some checks failed
DEV-234/pipeline/head There was a failure building this commit
Some checks failed
DEV-234/pipeline/head There was a failure building this commit
This commit is contained in:
parent
d40bb5a10f
commit
3d5a58dc1b
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user