keycloak/.drone.yml

107 lines
2.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

kind: pipeline
name: default
type: docker
steps:
- name: create-helm-template
image: alpine/helm:3.12.3
commands:
- helm template keycloak-dev ./deploy/helm --namespace keycloak-dev --values ./deploy/helm/keycloak-dev-values.yaml > ./deploy/helm/k8s-keycloak-dev.yaml
depends_on:
- rebuild-cache
when:
branch:
- master
- name: deploy
image: ghcr.io/bh90210/dron8s:latest
settings:
yaml: ./deploy/helm/k8s-keycloak-dev.yaml
kubeconfig:
from_secret: kubeconfig
depends_on:
- create-helm-template
when:
branch:
- master
- name: notify-deploy-success
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_bot_token
to:
from_secret: telegram_chat_id
message: |
🚀 Деплой успешно отправлен!
Сборка #{{build.number}}
Репозиторий: {{repo.name}}
Ветка: {{commit.branch}}
when:
status: [ success ]
depends_on:
- deploy
- name: notify-deploy-failure
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_bot_token
to:
from_secret: telegram_chat_id
message: |
❌ Деплой не отправлен!
Сборка #{{build.number}}
Репозиторий: {{repo.name}}
Ветка: {{commit.branch}}
when:
status: [ failure ]
depends_on:
- deploy
- name: notify-build-status
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_bot_token
to:
from_secret: telegram_chat_id
message: |
{{#eq build.status "success"}}📣 Сборка #{{build.number}} завершилась со статусом: {{build.status}}!{{/eq}}
{{#eq build.status "failure"}}🧱 Сборка #{{build.number}} завершилась со статусом: {{build.status}}!{{/eq}}
Репозиторий: {{repo.name}}
Ветка: {{commit.branch}}
Автор: {{commit.author}}
Сообщение: {{commit.message}}
Подробнее: [Ссылка на сборку]({{build.link}})
when:
status: [ success, failure ]
depends_on:
- notify-deploy-success
- notify-deploy-failure
image_pull_secrets:
- dockerconfig
node:
node: 149.154.64.5
trigger:
event:
include:
- push
- tag
- pull_request
- rollback
volumes:
- name: out
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock
- name: cache
host:
path: /tmp/.buildx-cache