51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
variables:
|
|
- ®istry registry.threesix.ai
|
|
- &project newtest
|
|
|
|
steps:
|
|
build-backend:
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
registry: *registry
|
|
repo: "*project/backend"
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
context: backend
|
|
dockerfile: backend/Dockerfile
|
|
cache: true
|
|
skip-tls-verify: true
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
build-frontend:
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
registry: *registry
|
|
repo: "*project/frontend"
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
context: frontend
|
|
dockerfile: frontend/Dockerfile
|
|
cache: true
|
|
skip-tls-verify: true
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
deploy:
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- kubectl set image deployment/newtest-backend backend=registry.threesix.ai/newtest/backend:${CI_COMMIT_SHA:0:8} -n projects
|
|
- kubectl set image deployment/newtest-frontend frontend=registry.threesix.ai/newtest/frontend:${CI_COMMIT_SHA:0:8} -n projects
|
|
- kubectl rollout status deployment/newtest-backend -n projects --timeout=120s
|
|
- kubectl rollout status deployment/newtest-frontend -n projects --timeout=120s
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
depends_on:
|
|
- build-backend
|
|
- build-frontend
|