VirtWeb/.drone.yml
Pierre HUBERT f403c85f0a
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Add release configuration
2025-04-07 12:31:42 +02:00

77 lines
1.5 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: web_build
image: node:23
volumes:
- name: web_app
path: /tmp/web_build
commands:
- cd virtweb_frontend
- npm install --legacy-peer-deps # TODO : remove when mui-file-input is updated
- npm run lint
- npm run build
- mv dist /tmp/web_build
- name: backend_check
image: rust
volumes:
- name: rust_registry
path: /usr/local/cargo/registry
commands:
- apt update && apt install -y libvirt-dev
- rustup component add clippy
- cd virtweb_backend
- cargo clippy -- -D warnings
- cargo clippy --examples -- -D warnings
- cargo test
- name: backend_compile
image: rust
volumes:
- name: rust_registry
path: /usr/local/cargo/registry
- name: web_app
path: /tmp/web_build
- name: release
path: /tmp/release
depends_on:
- backend_check
- web_build
commands:
- apt update && apt install -y libvirt-dev
- cd virtweb_backend
- mv /tmp/web_build/dist static
- cargo build --release
- ls -lah target/release/virtweb_backend
- cp target/release/virtweb_backend /tmp/release
- name: gitea_release
image: plugins/gitea-release
depends_on:
- backend_compile
when:
event:
- tag
volumes:
- name: release
path: /tmp/release
environment:
PLUGIN_API_KEY:
from_secret: API_KEY
settings:
base_url: https://gitea.communiquons.org
files: /tmp/release/*
checksum: sha512
volumes:
- name: rust_registry
temp: {}
- name: web_app
temp: {}
- name: release
temp: {}