42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
when:
|
|
branch: [main, high-performance]
|
|
event: push
|
|
|
|
matrix:
|
|
SERVICE:
|
|
- gateway
|
|
- users
|
|
- companies
|
|
- job_seekers
|
|
- customers
|
|
- payments
|
|
- employees
|
|
- photographers
|
|
- makeup_artists
|
|
- tutors
|
|
- developers
|
|
- video_editors
|
|
- graphic_designers
|
|
- social_media_managers
|
|
- fitness_trainers
|
|
- catering_services
|
|
- ugc_content_creators
|
|
- cron
|
|
|
|
steps:
|
|
- name: build-and-push
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
|
environment:
|
|
REGISTRY_HOSTPORT:
|
|
from_secret: REGISTRY_HOSTPORT
|
|
REGISTRY_USERNAME:
|
|
from_secret: REGISTRY_USERNAME
|
|
REGISTRY_PASSWORD:
|
|
from_secret: REGISTRY_PASSWORD
|
|
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)'
|
|
- 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}
|
|
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:latest
|
|
- docker push ${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE}:high-performance-latest
|