Merge branch 'migrate-to-matrix-sdk'
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
142
.drone.yml
142
.drone.yml
@@ -4,57 +4,101 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
# Code quality
|
||||
- name: code_quality
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
commands:
|
||||
- rustup component add clippy
|
||||
- cargo clippy -- -D warnings
|
||||
- cargo test
|
||||
# Frontend
|
||||
- name: web_build
|
||||
image: node:23
|
||||
volumes:
|
||||
- name: web_app
|
||||
path: /tmp/web_build
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- cd matrixgw_frontend
|
||||
- npm install
|
||||
- npm run lint
|
||||
- npm run build
|
||||
- mv dist /tmp/web_build
|
||||
|
||||
# Build source code
|
||||
- name: compile
|
||||
image: rust
|
||||
depends_on:
|
||||
- code_quality
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
- name: releases
|
||||
path: /tmp/releases
|
||||
commands:
|
||||
- cargo build --release
|
||||
- ls -lah target/release/matrix_gateway
|
||||
- cp target/release/matrix_gateway /tmp/releases
|
||||
# Backend
|
||||
- name: backend_fetch_deps
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
commands:
|
||||
- cd matrixgw_backend
|
||||
- cargo fetch
|
||||
|
||||
# Auto-release to Gitea
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
depends_on:
|
||||
- compile
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
volumes:
|
||||
- name: releases
|
||||
path: /tmp/releases
|
||||
environment:
|
||||
PLUGIN_API_KEY:
|
||||
from_secret: GITEA_API_KEY # needs permission write:repository
|
||||
settings:
|
||||
base_url: https://gitea.communiquons.org
|
||||
files:
|
||||
- /tmp/releases/matrix_gateway
|
||||
checksum: sha512
|
||||
- name: backend_code_quality
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
depends_on:
|
||||
- backend_fetch_deps
|
||||
commands:
|
||||
- cd matrixgw_backend
|
||||
- rustup component add clippy
|
||||
- cargo clippy -- -D warnings
|
||||
- cargo clippy --example api_curl -- -D warnings
|
||||
|
||||
- name: backend_test
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
depends_on:
|
||||
- backend_code_quality
|
||||
commands:
|
||||
- cd matrixgw_backend
|
||||
- cargo test
|
||||
|
||||
- name: backend_build
|
||||
image: rust
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
- name: web_app
|
||||
path: /tmp/web_build
|
||||
- name: release
|
||||
path: /tmp/release
|
||||
depends_on:
|
||||
- backend_test
|
||||
- web_build
|
||||
commands:
|
||||
- cd matrixgw_backend
|
||||
- mv /tmp/web_build/dist static
|
||||
- cargo build --release
|
||||
- cargo build --release --example api_curl
|
||||
- ls -lah target/release/matrixgw_backend target/release/examples/api_curl
|
||||
- cp target/release/matrixgw_backend target/release/examples/api_curl /tmp/release
|
||||
|
||||
# Release
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
depends_on:
|
||||
- backend_build
|
||||
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: releases
|
||||
temp: {}
|
||||
temp: {}
|
||||
- name: web_app
|
||||
temp: {}
|
||||
- name: release
|
||||
temp: {}
|
||||
|
||||
Reference in New Issue
Block a user