2020-05-01 22:21:28 +02:00
|
|
|
image: archlinux
|
2020-05-01 21:40:32 +02:00
|
|
|
packages:
|
|
|
|
- postgresql
|
2020-05-01 22:21:28 +02:00
|
|
|
- rustup
|
2020-05-01 21:40:32 +02:00
|
|
|
sources:
|
|
|
|
- https://git.sr.ht/~tsumanu/jirs
|
|
|
|
environment:
|
|
|
|
deploy: adrian.wozniak@ita-prog.pl
|
2020-05-02 00:12:47 +02:00
|
|
|
DATABASE_URL: postgres://build@localhost:5432/jirs
|
|
|
|
DEBUG: true
|
|
|
|
NODE_ENV: development
|
|
|
|
RUST_LOG: debug
|
|
|
|
JIRS_CLIENT_PORT: 7000
|
|
|
|
JIRS_CLIENT_BIND: 0.0.0.0
|
|
|
|
JIRS_SERVER_PORT: 5000
|
|
|
|
JIRS_SERVER_BIND: 0.0.0.0
|
2020-05-01 21:40:32 +02:00
|
|
|
secrets:
|
|
|
|
- 7ebab768-e5e4-4c9d-ba57-ec41a72c5665
|
|
|
|
tasks:
|
2020-05-01 22:21:28 +02:00
|
|
|
- build_config: |
|
2020-05-02 13:13:17 +02:00
|
|
|
cp ~/jirs/.builds/db.toml ~/jirs/jirs-server/db.toml
|
|
|
|
cp ~/jirs/.builds/db.toml ~/jirs/jirs-server/db.test.toml
|
2020-05-01 21:40:32 +02:00
|
|
|
- setup: |
|
2020-05-02 00:12:47 +02:00
|
|
|
sudo mkdir -p /var/lib/postgres/data
|
|
|
|
sudo chown build /var/lib/postgres/data
|
|
|
|
initdb -D /var/lib/postgres/data
|
|
|
|
sudo mkdir -p /run/postgresql
|
|
|
|
sudo chown build /run/postgresql
|
|
|
|
pg_ctl -D /var/lib/postgres/data start
|
2020-05-01 22:21:28 +02:00
|
|
|
rustup toolchain install nightly
|
|
|
|
rustup default nightly
|
2020-05-01 21:40:32 +02:00
|
|
|
cargo install diesel_cli --no-default-features --features postgres
|
|
|
|
cd jirs/jirs-server
|
2020-05-02 00:12:47 +02:00
|
|
|
/home/build/.cargo/bin/diesel setup
|
2020-05-01 21:40:32 +02:00
|
|
|
- test: |
|
|
|
|
cd jirs/jirs-server
|
|
|
|
cargo test --bin jirs_server
|
|
|
|
- build: |
|
|
|
|
cd jirs
|
|
|
|
cargo build --all --release
|
|
|
|
- deploy: |
|
|
|
|
cd jirs
|