librepages/.woodpecker.yml

105 lines
3.3 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
- sed -i 's%url = "http:\/\/localhost:6000"%url = "http:\/\/librepages-forms:6000"%' 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
2022-12-29 03:42:50 +05:30
tags:
latest
2022-12-19 06:37:11 +05:30
# 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
2022-12-29 03:42:50 +05:30
forms-postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=password
librepages-forms:
image: realaravinth/librepages-forms
command: forms serve
environment:
- LPFORMS_SOURCE_CODE=https://git.batsense.net/LibrePages/forms
- LPFORMS_SERVER__PROXY_HAS_TLS=false
- LPFORMS_DEBUG=false
- LPFORMS_SERVER_URL_PREFIX=""
- LPFORMS_SERVER_DOMAIN=forms.librepages.test
2022-12-29 03:42:50 +05:30
- LPFORMS_SERVER_IP=0.0.0.0
- LPFORMS_SERVER_PROXY_HAS_TLS=false
- LPFORMS_DASH_API_KEY=longrandomlygeneratedpassword
2022-12-29 03:42:50 +05:30
- LPFORMS_DATABASE_POOL=2
- PORT=6000
2022-12-29 17:11:20 +05:30
- DATABASE_URL=postgres://postgres:password@forms-postgres:5432/postgres
2022-12-29 03:42:50 +05:30
2022-12-19 06:37:11 +05:30
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
- LPCONDUCTOR_CREDS_TOKEN=longrandomlygeneratedpassword
2022-12-19 08:34:25 +05:30
- PORT=5000