ci: use crane to mirror base images, then build ai-assistant

- First step: crane copy base images from Docker Hub to registry.nxtgauge.com
  - rust:alpine, rust:1.87-alpine, alpine:3.20, node:20-alpine
- Second step: kaniko build ai-assistant image
- No DinD required - crane handles registry-to-registry copy
This commit is contained in:
Tracewebstudio Dev 2026-04-16 21:31:37 +02:00
parent 748d5afd8e
commit 6f945399f7

View file

@ -3,13 +3,28 @@ when:
event: push
steps:
- name: build-and-push
- name: mirror-base-images
image: gcr.io/go-containerregistry/crane:debug
environment:
REG_USER:
from_secret: REGISTRY_USERNAME
REG_PASS:
from_secret: REGISTRY_PASSWORD
commands:
- crane auth login registry.nxtgauge.com -u "$REG_USER" -p "$REG_PASS"
- crane copy docker.io/library/rust:alpine registry.nxtgauge.com/rust:alpine
- crane copy docker.io/library/rust:1.87-alpine registry.nxtgauge.com/rust:1.87-alpine
- crane copy docker.io/library/alpine:3.20 registry.nxtgauge.com/alpine:3.20
- crane copy docker.io/library/node:20-alpine registry.nxtgauge.com/node:20-alpine
- name: build-and-push-ai-assistant
image: woodpeckerci/plugin-kaniko:2.1.1
settings:
registry: registry.nxtgauge.com
repo: nxtgauge-ai-assistant
dockerfile: Dockerfile
tags:
- ${CI_COMMIT_SHA}
- latest
- high-performance-latest
username: