This commit is contained in:
2025-06-16 18:50:31 -03:00
parent a434640456
commit d8dc41222c

View File

@@ -10,32 +10,31 @@ trigger:
steps: steps:
- name: build-and-publish-backend - name: build-and-publish-backend
# Cambiamos la imagen a Kaniko
image: gcr.io/kaniko-project/executor:v1.9.0-debug image: gcr.io/kaniko-project/executor:v1.9.0-debug
settings: settings:
# El destino final de la imagen, incluyendo el registro y la primera tag # El nombre del campo debe ser "repo" para el destino principal,
destination: 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-backend:latest # y "tags" para las adicionales. El plugin de Drone lo traduce internamente para Kaniko.
# Para añadir más tags, las ponemos en una lista aquí repo: 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-backend
destinations: tags:
- 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-backend:${DRONE_COMMIT_SHA:0:8} - latest
# El Dockerfile que se va a usar - ${DRONE_COMMIT_SHA:0:8}
dockerfile: Backend/GestionIntegral.Api/Dockerfile dockerfile: Backend/GestionIntegral.Api/Dockerfile
# El contexto de la construcción (la raíz del repo)
context: . context: .
# Credenciales para el registro (Kaniko las usa para el push) # Las credenciales y la flag de inseguro se mantienen
username: username:
from_secret: GITEA_USER from_secret: GITEA_USER
password: password:
from_secret: ACTIONS_PAT from_secret: ACTIONS_PAT
# Flag para permitir la conexión a un registro inseguro (HTTP)
insecure: true insecure: true
- name: build-and-publish-frontend - name: build-and-publish-frontend
image: gcr.io/kaniko-project/executor:v1.9.0-debug image: gcr.io/kaniko-project/executor:v1.9.0-debug
settings: settings:
destination: 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-frontend:latest # Misma estructura para el frontend
destinations: repo: 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-frontend
- 192.168.4.128:5000/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME,,}-frontend:${DRONE_COMMIT_SHA:0:8} tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
dockerfile: Frontend/Dockerfile dockerfile: Frontend/Dockerfile
context: . context: .
username: username: