add pipeline to build the backend api
This commit is contained in:
parent
76e7338ab9
commit
92c1ee76f5
1 changed files with 24 additions and 6 deletions
30
.drone.yml
30
.drone.yml
|
|
@ -1,6 +1,6 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: default
|
name: frontend
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build frontend image
|
- name: Build frontend image
|
||||||
|
|
@ -9,7 +9,7 @@ steps:
|
||||||
username: "viktorbarzin"
|
username: "viktorbarzin"
|
||||||
password:
|
password:
|
||||||
from_secret: dockerhub-token
|
from_secret: dockerhub-token
|
||||||
repo: viktorbarzin/blog
|
repo: viktorbarzin/immoweb
|
||||||
dockerfile: crawler/frontend/Dockerfile
|
dockerfile: crawler/frontend/Dockerfile
|
||||||
context: crawler/frontend
|
context: crawler/frontend
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
|
@ -18,7 +18,25 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- "apk add curl"
|
- "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'
|
- '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: secret
|
---
|
||||||
# name: dockerhub_password
|
kind: pipeline
|
||||||
# data: ZB3OHrGwCBy4pVQZv+fiPWN1mUeegBnB2kh+2O5nbLQmoU2ls6bdXB70NiRcbVrE
|
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'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue