Files
vegasco/.drone.yml
ThompsonNye 07ab1efbe5
Some checks failed
continuous-integration/drone/push Build encountered an error
Add build step for Angular
2025-06-16 18:02:50 +02:00

93 lines
1.9 KiB
YAML

kind: pipeline
type: docker
name: Build and test
trigger:
event:
include:
- push
- pull_request
- custom
steps:
- name: compile (.NET)
image: mcr.microsoft.com/dotnet/sdk:9.0-alpine
environment:
CI_WORKSPACE: "/drone/src"
commands:
- dotnet build ./vegasco-server.slnx
- name: compile (Angular)
image: node:lts
commands:
- npm install -g pnpm
- cd src/Vegasco-Web
- pnpm install
- pnpm build
- name: test
image: quay.io/testcontainers/dind-drone-plugin
environment:
CI_WORKSPACE: "/drone/src"
settings:
build_image: mcr.microsoft.com/dotnet/sdk:9.0-alpine
cmd:
- dotnet test --no-build
volumes:
- name: dockersock
path: /var/run
depends_on:
- compile
- 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:
status:
- failure
depends_on:
- compile
- test
- docker build and push
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: { }