fix(ci): fallback to dockerhub secrets and static registry host
This commit is contained in:
parent
58217222d6
commit
58dc4ad059
1 changed files with 4 additions and 5 deletions
|
|
@ -27,14 +27,13 @@ steps:
|
|||
- name: build-and-push
|
||||
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
||||
environment:
|
||||
REGISTRY_HOSTPORT:
|
||||
from_secret: REGISTRY_HOSTPORT
|
||||
REGISTRY_HOSTPORT: docker-registry.registry.svc.cluster.local:5000
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
from_secret: DOCKERHUB_TOKEN
|
||||
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
|
||||
- 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 .
|
||||
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue