- 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
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
when:
|
|
branch: [main, high-performance]
|
|
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
|
|
- 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:
|
|
registry: registry.nxtgauge.com
|
|
repo: nxtgauge-rust-${SERVICE}
|
|
dockerfile: Dockerfile.simple
|
|
build_args:
|
|
- SERVICE_NAME=${SERVICE}
|
|
tags:
|
|
- latest
|
|
- high-performance-latest
|
|
username:
|
|
from_secret: REGISTRY_USERNAME
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
insecure: true
|
|
insecure_pull: true
|
|
skip_tls_verify: true
|
|
platforms: linux/amd64
|
|
cache: false
|
|
|
|
---
|
|
when:
|
|
branch: [main, high-performance]
|
|
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:
|
|
registry: registry.nxtgauge.com
|
|
repo: nxtgauge-db-migrate
|
|
dockerfile: Dockerfile.migrate
|
|
context: .
|
|
tags:
|
|
- latest
|
|
- high-performance-latest
|
|
username:
|
|
from_secret: REGISTRY_USERNAME
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
insecure: true
|
|
insecure_pull: true
|
|
skip_tls_verify: true
|
|
platforms: linux/amd64
|
|
cache: false
|