Fix. Se usa un repositorio de caché ficticio local que no requiere autenticación.
Some checks failed
Optimized Build and Deploy / remote-build-and-deploy (push) Failing after 17s
Some checks failed
Optimized Build and Deploy / remote-build-and-deploy (push) Failing after 17s
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
|||||||
mkdir -p "$KANIKO_CACHE_BACKEND" "$KANIKO_CACHE_FRONTEND"
|
mkdir -p "$KANIKO_CACHE_BACKEND" "$KANIKO_CACHE_FRONTEND"
|
||||||
chmod 777 "$KANIKO_CACHE_BACKEND" "$KANIKO_CACHE_FRONTEND"
|
chmod 777 "$KANIKO_CACHE_BACKEND" "$KANIKO_CACHE_FRONTEND"
|
||||||
|
|
||||||
# 3. Construcción paralela con Kaniko (solo build local)
|
# 3. Construcción paralela con Kaniko (con cache-repo local)
|
||||||
build_image() {
|
build_image() {
|
||||||
local context=$1
|
local context=$1
|
||||||
local dockerfile=$2
|
local dockerfile=$2
|
||||||
@@ -59,6 +59,7 @@ jobs:
|
|||||||
--dockerfile="/workspace/$dockerfile" \
|
--dockerfile="/workspace/$dockerfile" \
|
||||||
--cache=true \
|
--cache=true \
|
||||||
--cache-dir=/cache \
|
--cache-dir=/cache \
|
||||||
|
--cache-repo=localhost:5000/cache \
|
||||||
--no-push \
|
--no-push \
|
||||||
--destination="$image_name" \
|
--destination="$image_name" \
|
||||||
--tarPath="/workspace/$tar_path"
|
--tarPath="/workspace/$tar_path"
|
||||||
@@ -69,12 +70,12 @@ jobs:
|
|||||||
(build_image "." "Frontend/Dockerfile" "$KANIKO_CACHE_FRONTEND" "gestionintegralweb-frontend:latest" "frontend.tar") &
|
(build_image "." "Frontend/Dockerfile" "$KANIKO_CACHE_FRONTEND" "gestionintegralweb-frontend:latest" "frontend.tar") &
|
||||||
wait
|
wait
|
||||||
|
|
||||||
# 4. Cargar imágenes y etiquetar correctamente
|
# 4. Cargar imágenes y etiquetar
|
||||||
echo "Cargando y etiquetando imágenes..."
|
echo "Cargando y etiquetando imágenes..."
|
||||||
docker load -i "$TEMP_DIR/backend.tar"
|
docker load -i "$TEMP_DIR/backend.tar"
|
||||||
docker load -i "$TEMP_DIR/frontend.tar"
|
docker load -i "$TEMP_DIR/frontend.tar"
|
||||||
|
|
||||||
# Etiquetar las imágenes para que coincidan con docker-compose
|
# Etiquetar para docker-compose
|
||||||
docker tag gestionintegralweb-backend:latest dmolinari/gestionintegralweb-backend:latest
|
docker tag gestionintegralweb-backend:latest dmolinari/gestionintegralweb-backend:latest
|
||||||
docker tag gestionintegralweb-frontend:latest dmolinari/gestionintegralweb-frontend:latest
|
docker tag gestionintegralweb-frontend:latest dmolinari/gestionintegralweb-frontend:latest
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user