Files
vegasco/.drone.yml

102 lines
2.1 KiB
YAML
Raw Normal View History

kind: pipeline
type: docker
2024-08-23 19:02:01 +02:00
name: Build and test
trigger:
2024-08-23 19:02:01 +02:00
event:
include:
- push
- pull_request
- custom
steps:
- name: compile
2024-12-28 14:32:34 +01:00
image: mcr.microsoft.com/dotnet/sdk:9.0-alpine
environment:
CI_WORKSPACE: "/drone/src"
commands:
- dotnet build
volumes:
- name: dockersock
path: /var/run
2024-08-23 19:02:01 +02:00
- name: test
image: quay.io/testcontainers/dind-drone-plugin
environment:
CI_WORKSPACE: "/drone/src"
settings:
2024-12-28 14:32:34 +01:00
build_image: mcr.microsoft.com/dotnet/sdk:9.0-alpine
cmd:
- dotnet test --no-build
volumes:
- name: dockersock
path: /var/run
depends_on:
- compile
2024-12-28 17:20:10 +01:00
- name: test2
image: mcr.microsoft.com/dotnet/sdk:9.0
environment:
CI_WORKSPACE: "/drone/src"
commands:
- curl https://get.docker.com | bash
2024-12-28 17:24:06 +01:00
- docker ps -a
2024-12-28 17:20:10 +01:00
- dotnet test --no-build
volumes:
- name: dockersock
path: /var/run
depends_on:
- compile
2024-08-24 12:33:19 +02:00
- name: docker build and push
image: docker:24.0.7
commands:
- docker build . -t $docker_registry$docker_repo:$DRONE_BRANCH
- echo $docker_password | docker login --username $docker_username --password-stdin $docker_registry
- docker push $docker_registry$docker_repo:$DRONE_BRANCH
environment:
docker_username:
from_secret: docker_username
docker_password:
from_secret: docker_password
docker_repo:
from_secret: docker_repo
docker_registry:
from_secret: docker_registry
volumes:
- name: dockersock
path: /var/run
when:
branch:
- main
depends_on:
- compile
- test
- name: Telegram notification
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_user_id
when:
2024-08-24 12:46:33 +02:00
status:
- failure
depends_on:
- compile
- test
2024-08-24 12:55:25 +02:00
- docker build and push
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: { }