Add CI config
continuous-integration/drone the build failed Details

This commit is contained in:
Olivier 'reivilibre' 2022-03-17 23:52:41 +00:00
parent d09cfd4659
commit 098b1138c6
6 changed files with 87 additions and 1 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=

16
.ci/woodpecker/check.yml Normal file
View File

@ -0,0 +1,16 @@
# must set build pipeline as .woodpecker/ with the trailing slash to activate the
# multiple pipelines
platform: linux/amd64
pipeline:
clippy:
when:
event: [push, pull_request]
image: rust:1.59.0-slim
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential
- cargo install sqlx-cli --features sqlite
#- rustup component add clippy
# TODO clippy one day
- cargo check --all

16
.ci/woodpecker/manual.yml Normal file
View File

@ -0,0 +1,16 @@
platform: linux/arm64
pipeline:
deployManual:
image: docker.bics.ga/rei_ci/mdbook:latest-arm64
when:
branch:
- main
secrets:
- deploy_ssh_key
commands: # warning! Doesn't seem to like hashed known_hosts...
- 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 ./book/ space_docs_librepush_net@sallie.librepush.net:./public/quickpeep
- rm /tmp/rsync_key

View File

@ -0,0 +1,39 @@
# Building a release
platform: linux/${ARCH}
matrix:
ARCH:
- arm64
- amd64
.a1: &when
event: tag
tag: v*
pipeline:
buildRelease:
when: *when
image: "rust:1.59.0"
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential
- "qualsuff=`echo -$WOODPECKER_TAG-$WOODPECKER_ARCH | sed s%/%-%`"
- mkdir dist
- cargo install --path quickpeep --bins --root dist
- cargo install --path quickpeep_raker --bins --root dist
- cargo install --path quickpeep_indexer --bins --root dist
- cp -r scripts dist/
- "tar Jcvf quickpeep-$qualsuff.tar.xz"
uploadRelease:
when: *when
image: plugins/gitea-release
base_url: https://bics.ga
checksum:
- sha256
files:
- "quickpeep-*.tar.xz"
secrets:
- source: gitea_token
target: plugin_api_key

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ quickpeep_static/dist
quickpeep_static/node_modules
quickpeep/testdb.sqlite
qp_web.ron
dist

13
book.toml Normal file
View File

@ -0,0 +1,13 @@
[book]
authors = ["Olivier"]
language = "en"
multilingual = false
src = "docs"
title = "QuickPeep Documentation"
description = "Documentation for QuickPeep"
[output.html]
default-theme = "coal"
git-repository-url = "https://bics.ga/reivilibre/quickpeep.git"
git-repository-icon = "fa-git-alt"
fold = { enable = true, level = 1 }