fix(ci): restore working buildx settings pattern with registry push creds
This commit is contained in:
parent
58dc4ad059
commit
9f1db8286e
1 changed files with 28 additions and 13 deletions
|
|
@ -26,16 +26,31 @@ matrix:
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
||||||
environment:
|
settings:
|
||||||
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
|
insecure: true
|
||||||
REGISTRY_USERNAME:
|
registry: docker-registry.registry.svc.cluster.local:5000
|
||||||
from_secret: DOCKERHUB_USERNAME
|
repo: docker-registry.registry.svc.cluster.local:5000/nxtgauge-rust-${SERVICE}
|
||||||
REGISTRY_PASSWORD:
|
dockerfile: Dockerfile.simple
|
||||||
from_secret: DOCKERHUB_TOKEN
|
build_args:
|
||||||
commands:
|
- SERVICE_NAME=${SERVICE}
|
||||||
- 'test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN" && exit 1)'
|
tags:
|
||||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
- ${CI_COMMIT_SHA}
|
||||||
- docker build -f Dockerfile.simple --build-arg SERVICE_NAME=${SERVICE} -t ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA} -t ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:latest -t ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:high-performance-latest .
|
- latest
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA}
|
- high-performance-latest
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:latest
|
logins:
|
||||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:high-performance-latest
|
- registry: https://index.docker.io/v1/
|
||||||
|
username:
|
||||||
|
from_secret: DOCKERHUB_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: DOCKERHUB_TOKEN
|
||||||
|
- registry: ghcr.io
|
||||||
|
username:
|
||||||
|
from_secret: GHCR_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: GHCR_TOKEN
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASSWORD
|
||||||
|
platforms: linux/amd64
|
||||||
|
no_cache: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue