home-app/.drone.yml

80 lines
2.3 KiB
YAML
Raw Normal View History

2022-04-30 07:00:02 +00:00
kind: pipeline
type: docker
2022-04-30 07:26:31 +00:00
name: build-and-deploy
2022-04-30 07:00:02 +00:00
steps:
2022-05-03 05:14:12 +00:00
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
2022-04-30 07:00:02 +00:00
- name: build
image: node:lts-bullseye
commands:
2022-05-03 05:14:12 +00:00
- apt-get update -y && apt-get install git -y
- yarn && yarn build
- name: rebuild-cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
2022-04-30 07:00:02 +00:00
- name: upload
image: plugins/s3
settings:
bucket: home-app
2022-04-30 07:41:37 +00:00
region: us-ashburn-02
acl: public-read
2022-04-30 07:00:02 +00:00
endpoint: https://storage.186526.xyz
access_key:
from_secret: s3_access_key
secret_key:
from_secret: s3_secret_key
source: dist/**/*
2022-04-30 07:53:11 +00:00
target: /dist
2022-04-30 13:28:12 +00:00
path_style: true
2022-05-03 05:14:12 +00:00
- name: docker
2022-05-02 09:16:10 +00:00
image: plugins/docker
2022-05-03 05:21:55 +00:00
failure: ignore
2022-05-02 09:16:10 +00:00
settings:
username:
from_secret: docker_username
2022-05-03 05:14:12 +00:00
password:
2022-05-02 09:16:10 +00:00
from_secret: docker_password
auto_tag: true
repo: registry.186526.xyz/home-app
registry: registry.186526.xyz
2022-05-03 05:14:12 +00:00
2022-05-03 04:43:30 +00:00
- name: deploy
2022-05-03 05:28:44 +00:00
image: danielgormly/drone-plugin-kube
failure: ignore
2022-05-03 04:43:30 +00:00
settings:
template: ./deploy.yaml
ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlRENDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUyTXpZeU9ERTJOamd3SGhjTk1qRXhNVEEzTVRBME1UQTRXaGNOTXpFeE1UQTFNVEEwTVRBNApXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUyTXpZeU9ERTJOamd3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFUc043OEFSNnpTMUMwdlR3UElxdnpQdmFrblYrT09XV0V1YmlMOE1KSVgKbGl5a0NtQU56blVDbEJVaG1saU1Zb3BmM0dLSWpYR0x3VHJjVEFETzlmNXRvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVXVTL29pL3RGckR5Sm1VRUxIL05YCmg3SEFURDh3Q2dZSUtvWkl6ajBFQXdJRFNRQXdSZ0loQUxrQVliczdBZDBGSjYwSFJ1QlNmbjI1VnlySUxpZXQKUTdwVHlSOHpnLzVvQWlFQStuTWd2OE5GMHJncFJFOEtiQkhoVXlmL3p6VnBmNFpiWlEzaEs1NjJpWDQ9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
2022-05-03 05:14:12 +00:00
server: https://10.0.0.86:6443
2022-05-03 04:43:30 +00:00
token:
from_secret: kubernetes_token
2022-05-03 05:14:12 +00:00
2022-05-02 09:16:10 +00:00
- name: notification
2022-04-30 13:28:12 +00:00
image: appleboy/drone-telegram
settings:
2022-05-03 05:14:12 +00:00
token:
2022-04-30 13:28:12 +00:00
from_secret: telegram_bot_token
2022-05-03 05:14:12 +00:00
to: real186526
volumes:
- name: cache
host:
path: /tmp/drone/cache