update drone.yaml to build on push

This commit is contained in:
Viktor Barzin 2026-02-01 21:53:18 +00:00
parent f88bba032f
commit 22aa9c86a7
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863

View file

@ -1,66 +1,56 @@
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: frontend name: frontend
timeout: 30m
trigger: trigger:
event:
- push
- cron
branch: branch:
- master - master
event:
- push
steps: steps:
- name: Build frontend image - name: Build frontend image
image: plugins/docker image: plugins/docker
settings: settings:
username: "viktorbarzin" username: viktorbarzin
password: password:
from_secret: dockerhub-token from_secret: dockerhub-token
repo: viktorbarzin/immoweb repo: viktorbarzin/immoweb
dockerfile: crawler/frontend/Dockerfile dockerfile: crawler/frontend/Dockerfile
context: crawler/frontend context: crawler/frontend
cache_from: "viktorbarzin/immoweb:latest"
auto_tag: true auto_tag: true
- name: Update deployment - name: Update deployment
image: alpine image: alpine
commands: commands:
- "apk add curl" - 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' - '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 kind: pipeline
type: kubernetes type: kubernetes
name: api name: api
timeout: 30m
trigger: trigger:
event:
- push
- cron
branch: branch:
- master - master
event:
- push
steps: steps:
- name: Build backend API image - name: Build API image
image: plugins/docker image: plugins/docker
settings: settings:
username: "viktorbarzin" username: viktorbarzin
password: password:
from_secret: dockerhub-token from_secret: dockerhub-token
repo: viktorbarzin/realestatecrawler repo: viktorbarzin/realestatecrawler
dockerfile: crawler/Dockerfile dockerfile: crawler/Dockerfile
context: crawler/ context: crawler/
cache_from: "viktorbarzin/realestatecrawler:latest"
auto_tag: true auto_tag: true
- name: Update deployment - name: Update deployment
image: alpine image: alpine
commands: commands:
- "apk add curl" - 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' - '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'
# Sun Feb 1 08:29:56 PM UTC 2026
# Webhook test Sun Feb 1 08:45:52 PM UTC 2026
# 1769978870
# test 1769979073
# final test 1769979293
# no secret test 1769979359