ci: use kaniko, registry host from secret, remove hardcoded values

This commit is contained in:
Tracewebstudio Dev 2026-04-17 00:38:21 +02:00
parent 4435025421
commit b97cc789fa

View file

@ -29,21 +29,28 @@ matrix:
- cron
steps:
- name: login-and-push
image: registry.nxtgauge.com/docker:28-cli
environment:
REGISTRY_HOSTPORT:
- name: build-and-push
image: woodpeckerci/plugin-kaniko:2.1.1
settings:
registry:
from_secret: REGISTRY_HOSTPORT
REGISTRY_USERNAME:
repo: nxtgauge-rust-${SERVICE}
dockerfile: Dockerfile.simple
build_args:
- SERVICE_NAME=${SERVICE}
tags:
- ${CI_COMMIT_SHA}
- latest
- high-performance-latest
username:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
password:
from_secret: REGISTRY_PASSWORD
SERVICE_NAME:
from_secret: SERVICE_NAME
commands:
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}" --build-arg SERVICE_NAME=${SERVICE} -f Dockerfile.simple .
- docker push "${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}"
insecure: true
insecure_pull: true
skip_tls_verify: true
platforms: linux/amd64
cache: false
---
when:
@ -51,16 +58,24 @@ when:
event: push
steps:
- name: login-and-push-migrate
image: registry.nxtgauge.com/docker:28-cli
environment:
REGISTRY_HOSTPORT:
- name: build-and-push-migrate
image: woodpeckerci/plugin-kaniko:2.1.1
settings:
registry:
from_secret: REGISTRY_HOSTPORT
REGISTRY_USERNAME:
repo: nxtgauge-db-migrate
dockerfile: Dockerfile.migrate
context: .
tags:
- ${CI_COMMIT_SHA}
- latest
- high-performance-latest
username:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
password:
from_secret: REGISTRY_PASSWORD
commands:
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-db-migrate" -f Dockerfile.migrate .
- docker push "${REGISTRY_HOSTPORT}/nxtgauge-db-migrate"
insecure: true
insecure_pull: true
skip_tls_verify: true
platforms: linux/amd64
cache: false