fix(ci): fallback to dockerhub secrets and static registry host

This commit is contained in:
Ashwin Kumar 2026-04-11 00:07:58 +02:00
parent 688e1347e0
commit 63b1d85450

View file

@ -6,14 +6,13 @@ 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: environment:
REGISTRY_HOSTPORT: REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
from_secret: REGISTRY_HOSTPORT
REGISTRY_USERNAME: REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME from_secret: DOCKERHUB_USERNAME
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD from_secret: DOCKERHUB_TOKEN
commands: commands:
- 'test -n "${REGISTRY_HOSTPORT}" && test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: REGISTRY_HOSTPORT, REGISTRY_USERNAME, REGISTRY_PASSWORD" && exit 1)' - 'test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN" && exit 1)'
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin - echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
- docker build -f Dockerfile.simple -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA} -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:latest -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:high-performance-latest . - docker build -f Dockerfile.simple -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA} -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:latest -t ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:high-performance-latest .
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA} - docker push ${REGISTRY_HOSTPORT}/nxtgauge-admin-solid:${CI_COMMIT_SHA}