Browse Source

Build and deploy manual in CI

develop
Olivier 'reivilibre' 2 months ago
parent
commit
7b4d91dc76
  1. 1
      .ci/known_hosts
  2. 46
      .drone.yml

1
.ci/known_hosts

@ -0,0 +1 @@
sallie.librepush.net,79.143.178.141 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHPJu+9XaDuDQA8jVdD++BSkazgVUt1c22oa+FoWiqWVWAVu33+Jh3Evc4s3HK6jMMuOIVs8AVnGAUY5eaqmJik=

46
.drone.yml

@ -6,20 +6,36 @@ platform:
arch: arm64
steps:
- name: unit tests
image: rust:1.49.0-slim
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev
- cargo build --verbose --all
- cargo test --verbose --all
- name: unit tests
image: rust:1.49.0-slim
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev
- cargo build --verbose --all
- cargo test --verbose --all
- name: test suite
image: rust:1.53.0-slim-bullseye
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev python3.9 python3.9-venv
- cargo install --path yama
- cargo install --path datman
- python3.9 -m venv testsuite/.venv
- ./testsuite/.venv/bin/pip install -e testsuite
- cd testsuite && ./.venv/bin/green
- name: test suite
image: rust:1.53.0-slim-bullseye
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev python3.9 python3.9-venv
- cargo install --path yama
- cargo install --path datman
- python3.9 -m venv testsuite/.venv
- ./testsuite/.venv/bin/pip install -e testsuite
- cd testsuite && ./.venv/bin/green
- name: deploy manual
image: rust:1.53.0-slim
when:
branch:
- develop
environment:
DEPLOY_SSH_KEY:
from_secret: DEPLOY_SSH_KEY
commands: # warning! Doesn't seem to like hashed known_hosts...
- cargo install mdbook
- cd docs
- mdbook build
- echo "$DEPLOY_SSH_KEY" > /tmp/rsync_key
- chmod u=rw,go= /tmp/rsync_key
- rsync -e 'ssh -i /tmp/rsync_key -o "UserKnownHostsFile .ci/known_hosts"' -vaz --delete ./docs/book space_docs_librepush_net@sallie.librepush.net:./public/yama
- rm /tmp/rsync_key
Loading…
Cancel
Save