librepages/.woodpecker.yml

83 lines
2.5 KiB
YAML
Raw Permalink Normal View History

2022-12-19 06:37:11 +05:30
pipeline:
backend:
image: rust
environment:
2022-12-19 12:43:13 +05:30
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
2022-12-19 06:37:11 +05:30
commands:
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
- apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
2022-12-19 06:37:11 +05:30
- rustup component add rustfmt
- rustup component add clippy
# rewrite conducotr configuration
2022-12-19 09:00:17 +05:30
- sed -i 's%url = "http:\/\/localhost:5000"%url = "http:\/\/librepages-conductor:5000"%' config/default.toml
2022-12-19 06:37:11 +05:30
- make dev-env
2022-12-19 12:43:13 +05:30
- make migrate
2022-12-19 06:37:11 +05:30
- make lint
2022-12-19 12:43:13 +05:30
- make test
- make release
2022-12-19 06:37:11 +05:30
build_docker_img:
image: plugins/docker
when:
event: [pull_request]
settings:
dry_run: true
repo: realaravinth/librepages
tags: latest
build_and_publish_docker_img:
image: plugins/docker
when:
event: [push, tag, deployment]
settings:
username: realaravinth
password:
from_secret: DOCKER_TOKEN
repo: realaravinth/librepages
tags: latest
# build_publisher_docker_img:
# image: plugins/docker
# when:
# event: [push, tag, deployment]
# settings:
# dry_run: true
# dockerfile: scripts/publish-bins-docker
# purge: false
# repo: realaravinth/librepages-publisher
# tags: latest
#
2022-12-19 06:37:11 +05:30
publish_bins:
image: rust
2022-12-19 06:37:11 +05:30
when:
event: [push, tag, deployment]
commands:
- apt update
- apt-get -y --no-install-recommends install gpg tar curl wget
- echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback
- scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
2022-12-19 06:37:11 +05:30
secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
services:
database:
2022-12-19 06:37:11 +05:30
image: postgres
environment:
- POSTGRES_PASSWORD=password
librepages-conductor:
2022-12-19 08:28:36 +05:30
image: realaravinth/librepages-conductor
2022-12-19 06:37:11 +05:30
command: conductor serve
environment:
- LPCONDUCTOR_SERVER__PROXY_HAS_TLS=false
2022-12-19 08:36:01 +05:30
- LPCONDUCTOR_DEBUG=false
2022-12-19 08:40:20 +05:30
- LPCONDUCTOR_CONDUCTOR=dummy
2022-12-19 06:37:11 +05:30
- LPCONDUCTOR_SERVER_URL_PREFIX=""
- LPCONDUCTOR_SERVER_DOMAIN="librepages.test"
2022-12-19 08:40:20 +05:30
- LPCONDUCTOR_SERVER_IP=0.0.0.0
2022-12-19 08:36:01 +05:30
- LPCONDUCTOR_SERVER_PROXY_HAS_TLS=false
2022-12-19 06:37:11 +05:30
- LPCONDUCTOR_SERVER_PORT=7000
2022-12-19 08:40:20 +05:30
- LPCONDUCTOR_SOURCE_CODE=https://example.org
2022-12-19 06:37:11 +05:30
- LPCONDUCTOR_CREDS_USERNAME="librepages_api"
- LPCONDUCTOR_CREDS_PASSWORD="longrandomlygeneratedpassword"
2022-12-19 08:34:25 +05:30
- PORT=5000