2024-06-10 14:59:45 +05:30
|
|
|
steps:
|
|
|
|
librepages-conductor:
|
|
|
|
image: realaravinth/librepages-conductor
|
|
|
|
detach: true
|
|
|
|
environment:
|
|
|
|
- LPCONDUCTOR__SOURCE_CODE=https://git.batsense.net/LibrePages/conductor
|
|
|
|
- LPCONDUCTOR_SERVER__PROXY_HAS_TLS=false
|
|
|
|
- LPCONDUCTOR_DEBUG=false
|
|
|
|
- LPCONDUCTOR_CONDUCTOR=dummy
|
|
|
|
- LPCONDUCTOR_SERVER_DOMAIN=librepages.test
|
|
|
|
- LPCONDUCTOR_SERVER_IP=0.0.0.0
|
|
|
|
- LPCONDUCTOR_SERVER_PROXY_HAS_TLS=false
|
|
|
|
- LPCONDUCTOR_SERVER_PORT=7000
|
|
|
|
- LPCONDUCTOR_SOURCE_CODE=https://example.org
|
|
|
|
- LPCONDUCTOR_CREDS_USERNAME=librepages_api
|
|
|
|
- LPCONDUCTOR_CREDS_TOKEN=longrandomlygeneratedpassword
|
|
|
|
- PORT=5000
|
|
|
|
- LPCONDUCTOR_CREDS_PASSWORD=longrandomlygeneratedpassword
|
|
|
|
commands:
|
|
|
|
- conductor serve
|
|
|
|
|
2022-12-19 06:37:11 +05:30
|
|
|
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 - &&\
|
2022-12-19 14:53:46 +05:30
|
|
|
- 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
|
2022-12-19 14:53:46 +05:30
|
|
|
- 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]
|
2024-06-10 14:59:45 +05:30
|
|
|
branch: master
|
2022-12-19 06:37:11 +05:30
|
|
|
settings:
|
|
|
|
username: realaravinth
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_TOKEN
|
|
|
|
repo: realaravinth/librepages
|
2024-06-10 14:59:45 +05:30
|
|
|
tags:
|
|
|
|
latest
|
2022-12-19 06:37:11 +05:30
|
|
|
|
2022-12-19 14:53:46 +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:
|
2022-12-19 14:53:46 +05:30
|
|
|
image: rust
|
2022-12-19 06:37:11 +05:30
|
|
|
when:
|
|
|
|
event: [push, tag, deployment]
|
2024-06-10 14:59:45 +05:30
|
|
|
branch: master
|
2022-12-19 06:37:11 +05:30
|
|
|
commands:
|
2022-12-19 14:53:46 +05:30
|
|
|
- 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:
|
2022-12-19 10:57:30 +05:30
|
|
|
database:
|
2022-12-19 06:37:11 +05:30
|
|
|
image: postgres
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=password
|