Build and deploy manual in CI
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Olivier 'reivilibre' 2021-07-28 21:32:28 +01:00
parent 342a3b06be
commit 7b4d91dc76
2 changed files with 32 additions and 15 deletions

1
.ci/known_hosts Normal file
View File

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

View File

@ -6,20 +6,36 @@ platform:
arch: arm64 arch: arm64
steps: steps:
- name: unit tests - name: unit tests
image: rust:1.49.0-slim image: rust:1.49.0-slim
commands: commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev - apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev
- cargo build --verbose --all - cargo build --verbose --all
- cargo test --verbose --all - cargo test --verbose --all
- name: test suite - name: test suite
image: rust:1.53.0-slim-bullseye image: rust:1.53.0-slim-bullseye
commands: commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev python3.9 python3.9-venv - 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 yama
- cargo install --path datman - cargo install --path datman
- python3.9 -m venv testsuite/.venv - python3.9 -m venv testsuite/.venv
- ./testsuite/.venv/bin/pip install -e testsuite - ./testsuite/.venv/bin/pip install -e testsuite
- cd testsuite && ./.venv/bin/green - 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