2026-04-09 00:09:02 +02:00
|
|
|
when:
|
2026-04-10 05:21:37 +02:00
|
|
|
branch: [main, high-performance]
|
2026-04-09 00:09:02 +02:00
|
|
|
event: push
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: build-and-push
|
2026-04-10 23:55:54 +02:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2026-04-10 23:20:24 +02:00
|
|
|
environment:
|
2026-04-11 00:07:57 +02:00
|
|
|
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
|
2026-04-10 23:20:24 +02:00
|
|
|
REGISTRY_USERNAME:
|
2026-04-11 00:07:57 +02:00
|
|
|
from_secret: DOCKERHUB_USERNAME
|
2026-04-10 23:20:24 +02:00
|
|
|
REGISTRY_PASSWORD:
|
2026-04-11 00:07:57 +02:00
|
|
|
from_secret: DOCKERHUB_TOKEN
|
2026-04-10 23:20:24 +02:00
|
|
|
commands:
|
2026-04-11 00:07:57 +02:00
|
|
|
- 'test -n "${REGISTRY_USERNAME}" && test -n "${REGISTRY_PASSWORD}" || (echo "Missing one or more required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN" && exit 1)'
|
2026-04-10 23:55:54 +02:00
|
|
|
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
|
|
|
|
- docker build -f Dockerfile.simple -t ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:${CI_COMMIT_SHA} -t ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:latest -t ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:high-performance-latest .
|
|
|
|
|
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:${CI_COMMIT_SHA}
|
|
|
|
|
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:latest
|
|
|
|
|
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-frontend-solid:high-performance-latest
|