dev #35

Merged
jjminguez merged 43 commits from dev into master 2026-04-16 14:37:33 +00:00
Showing only changes of commit 069a29bc27 - Show all commits

View File

@@ -2,10 +2,10 @@ pipeline {
agent any
environment {
// Valores iniciales por seguridad
CONTAINER_NAME = "django_app_dev"
PORT = "8000"
DEBUG_MODE = "1"
// Dejamos las variables vacías aquí para que el script las rellene
CONTAINER_NAME = ""
PORT = ""
DEBUG_MODE = ""
}
stages {
@@ -13,12 +13,12 @@ pipeline {
steps {
script {
if (env.BRANCH_NAME == 'master') {
echo "--- CONFIGURANDO MODO PRODUCCIÓN (MASTER) ---"
echo "--- ASIGNANDO VALORES DE PRODUCCIÓN ---"
env.CONTAINER_NAME = "django_app_master"
env.PORT = "8001"
env.DEBUG_MODE = "0"
} else if (env.BRANCH_NAME == 'dev') {
echo "--- CONFIGURANDO MODO DESARROLLO (DEV) ---"
} else {
echo "--- ASIGNANDO VALORES DE DESARROLLO ---"
env.CONTAINER_NAME = "django_app_dev"
env.PORT = "8000"
env.DEBUG_MODE = "1"
@@ -32,8 +32,7 @@ pipeline {
anyOf { branch 'dev'; branch 'master' }
}
steps {
echo "Desplegando contenedor: ${env.CONTAINER_NAME} en puerto: ${env.PORT}"
// Ahora Docker Compose sí recibirá los valores correctamente
echo "EJECUTANDO DOCKER: ${env.CONTAINER_NAME} en el puerto ${env.PORT}"
sh "docker compose -f deployments/docker-compose.yml up -d --build"
}
}