p00003/Jenkinsfile
= 580cece07b
All checks were successful
DEV-234/pipeline/head This commit looks good
change last step Jenkins
2025-01-18 11:13:45 -05:00

66 lines
1.5 KiB
Groovy

pipeline {
agent any
environment {
DOCKER_IMAGE_PGADMIN = 'dpage/pgadmin4:latest'
DOCKER_IMAGE_POSTGRES = 'postgres:16.6'
PODMAN_COMPOSE_PATH = '/home/v/projects/p00003/'
DOCKER_COMPOSE_FILE = 'podman-compose.yml'
}
stages {
stage('Checkout') {
steps {
// Checkout the code from Gitea
git url: 'http://gitea.domeitsolutions.com/2265959/p00003.git', branch: 'main'
}
}
stage('Build Node.js') {
steps {
script {
echo 'Start run'
}
}
}
stage('Run Tests') {
steps {
script {
sh """
echo 'testing'
pwd
ls
podman-compose -f podman-compose.yml --dry-run up --abort-on-container-exit
"""
}
}
}
stage('Deploy') {
steps {
script {
// Deploy using Docker Compose
sh """
podman-compose down
echo 'deploying'
podman-compose -f podman-compose.yml up -d
"""
}
}
}
}
post {
always {
sh """
echo 'End of run. API has restarted'
podman ps
"""
}
}
}