wrongmove/.drone.yml
Viktor Barzin 6d17d2ccad Fix Drone CI trigger to allow push events
Remove cron filter that was blocking push events from triggering builds.
The cron filter was applying to all events, not just cron jobs.
2026-02-01 20:25:32 +00:00

60 lines
1.9 KiB
YAML

kind: pipeline
type: kubernetes
name: frontend
timeout: 30m
trigger:
event:
- push
- cron
branch:
- master
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
cache_from: "viktorbarzin/immoweb:latest"
auto_tag: true
- name: Update deployment
image: alpine
commands:
- "apk add curl"
- 'curl -X PATCH https://kubernetes:6443/apis/apps/v1/namespaces/realestate-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
timeout: 30m
trigger:
event:
- push
- cron
branch:
- master
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/
cache_from: "viktorbarzin/realestatecrawler:latest"
auto_tag: true
- name: Update deployment
image: alpine
commands:
- "apk add curl"
- 'curl -X PATCH https://kubernetes:6443/apis/apps/v1/namespaces/realestate-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'