ci: mirror base images first, then build services
- First step: crane copy rust:alpine, rust:1.87-alpine, alpine:3.20 to registry - Second step: kaniko build each service with mirrored base images - No DinD required
This commit is contained in:
parent
770ebcbfc6
commit
9444056297
1 changed files with 24 additions and 28 deletions
|
|
@ -2,33 +2,20 @@ when:
|
|||
branch: [main, high-performance]
|
||||
event: push
|
||||
|
||||
concurrency:
|
||||
limit: 4
|
||||
|
||||
matrix:
|
||||
SERVICE:
|
||||
- gateway
|
||||
- users
|
||||
- companies
|
||||
- jobs
|
||||
- leads
|
||||
- job-seekers
|
||||
- customers
|
||||
- payments
|
||||
- employees
|
||||
- photographers
|
||||
- makeup-artists
|
||||
- tutors
|
||||
- developers
|
||||
- video-editors
|
||||
- graphic-designers
|
||||
- social-media-managers
|
||||
- fitness-trainers
|
||||
- catering-services
|
||||
- ugc-content-creators
|
||||
- cron
|
||||
|
||||
steps:
|
||||
- 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
|
||||
|
||||
- name: build-and-push
|
||||
image: woodpeckerci/plugin-kaniko:2.1.1
|
||||
settings:
|
||||
|
|
@ -38,7 +25,6 @@ steps:
|
|||
build_args:
|
||||
- SERVICE_NAME=${SERVICE}
|
||||
tags:
|
||||
- ${CI_COMMIT_SHA}
|
||||
- latest
|
||||
- high-performance-latest
|
||||
username:
|
||||
|
|
@ -57,6 +43,17 @@ when:
|
|||
event: push
|
||||
|
||||
steps:
|
||||
- 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
|
||||
|
||||
- name: build-and-push-migrate
|
||||
image: woodpeckerci/plugin-kaniko:2.1.1
|
||||
settings:
|
||||
|
|
@ -65,7 +62,6 @@ steps:
|
|||
dockerfile: Dockerfile.migrate
|
||||
context: .
|
||||
tags:
|
||||
- ${CI_COMMIT_SHA}
|
||||
- latest
|
||||
- high-performance-latest
|
||||
username:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue