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]
|
branch: [main, high-performance]
|
||||||
event: push
|
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:
|
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
|
- name: build-and-push
|
||||||
image: woodpeckerci/plugin-kaniko:2.1.1
|
image: woodpeckerci/plugin-kaniko:2.1.1
|
||||||
settings:
|
settings:
|
||||||
|
|
@ -38,7 +25,6 @@ steps:
|
||||||
build_args:
|
build_args:
|
||||||
- SERVICE_NAME=${SERVICE}
|
- SERVICE_NAME=${SERVICE}
|
||||||
tags:
|
tags:
|
||||||
- ${CI_COMMIT_SHA}
|
|
||||||
- latest
|
- latest
|
||||||
- high-performance-latest
|
- high-performance-latest
|
||||||
username:
|
username:
|
||||||
|
|
@ -57,6 +43,17 @@ when:
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
steps:
|
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
|
- name: build-and-push-migrate
|
||||||
image: woodpeckerci/plugin-kaniko:2.1.1
|
image: woodpeckerci/plugin-kaniko:2.1.1
|
||||||
settings:
|
settings:
|
||||||
|
|
@ -65,7 +62,6 @@ steps:
|
||||||
dockerfile: Dockerfile.migrate
|
dockerfile: Dockerfile.migrate
|
||||||
context: .
|
context: .
|
||||||
tags:
|
tags:
|
||||||
- ${CI_COMMIT_SHA}
|
|
||||||
- latest
|
- latest
|
||||||
- high-performance-latest
|
- high-performance-latest
|
||||||
username:
|
username:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue