wrongmove/.drone.yml
2025-06-17 18:56:52 +00:00

42 lines
1.6 KiB
YAML

kind: pipeline
type: kubernetes
name: frontend
steps:
- name: Build frontend image
image: plugins/docker
settings:
username: "viktorbarzin"
password:
from_secret: dockerhub-token
repo: viktorbarzin/immoweb
dockerfile: crawler/frontend/Dockerfile
context: crawler/frontend
auto_tag: true
- name: Update deployment
image: alpine
commands:
- "apk add curl"
- 'curl -X PATCH https://kubernetes:6443/apis/apps/v1/namespaces/real-estate-crawler/deployments/realestate-crawler-ui -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" -H "Content-Type:application/strategic-merge-patch+json" -k -d ''{"spec": {"template": {"metadata": { "annotations": {"kubectl.kubernetes.io/restartedAt": "''$(date +%Y-%m-%dT%TZ)''" }}}}}'' | head'
---
kind: pipeline
type: kubernetes
name: api
steps:
- name: Build backend API image
image: plugins/docker
settings:
username: "viktorbarzin"
password:
from_secret: dockerhub-token
repo: viktorbarzin/realestatecrawler
dockerfile: crawler/Dockerfile
context: crawler/
auto_tag: true
- name: Update deployment
image: alpine
commands:
- "apk add curl"
- 'curl -X PATCH https://kubernetes:6443/apis/apps/v1/namespaces/real-estate-crawler/deployments/realestate-crawler-api -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" -H "Content-Type:application/strategic-merge-patch+json" -k -d ''{"spec": {"template": {"metadata": { "annotations": {"kubectl.kubernetes.io/restartedAt": "''$(date +%Y-%m-%dT%TZ)''" }}}}}'' | head'