Add initial cicd yaml
This commit is contained in:
66
.drone.yml
Normal file
66
.drone.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: Pipeline
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
include:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
- custom
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: compile
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
|
||||||
|
environment:
|
||||||
|
CI_WORKSPACE: "/drone/src"
|
||||||
|
commands:
|
||||||
|
- dotnet build
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
image: quay.io/testcontainers/dind-drone-plugin
|
||||||
|
environment:
|
||||||
|
CI_WORKSPACE: "/drone/src"
|
||||||
|
settings:
|
||||||
|
build_image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
|
||||||
|
cmd:
|
||||||
|
- dotnet test --no-build
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
depends_on:
|
||||||
|
- compile
|
||||||
|
|
||||||
|
- name: Telegram notification
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
settings:
|
||||||
|
token:
|
||||||
|
from_secret: telegram_token
|
||||||
|
to:
|
||||||
|
from_secret: telegram_user_id
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
depends_on:
|
||||||
|
- compile
|
||||||
|
- test
|
||||||
|
- docker build and push
|
||||||
|
- deploy to test
|
||||||
|
- deploy to prod
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: docker
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
temp: { }
|
||||||
@@ -10,6 +10,7 @@ EndProject
|
|||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A16251C2-47DB-4017-812B-CA18B280E049}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A16251C2-47DB-4017-812B-CA18B280E049}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
|
.drone.yml = .drone.yml
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{437DE053-1DAB-4EEF-BEA6-E3B5179692F8}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{437DE053-1DAB-4EEF-BEA6-E3B5179692F8}"
|
||||||
|
|||||||
Reference in New Issue
Block a user