nxtgauge-frontend-solid/.woodpecker.yml

21 lines
1.1 KiB
YAML
Raw Normal View History

when:
branch: [main, high-performance]
event: push
steps:
- name: build-and-push
image: woodpeckerci/plugin-docker-buildx:5.0.0
environment:
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
REGISTRY_USERNAME:
from_secret: DOCKERHUB_USERNAME
REGISTRY_PASSWORD:
from_secret: DOCKERHUB_TOKEN
commands:
- '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
- 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