2023-12-17 19:29:37 +05:30
|
|
|
steps:
|
|
|
|
backend:
|
|
|
|
image: rust
|
|
|
|
commands:
|
2023-12-30 14:18:15 +05:30
|
|
|
- apt update
|
|
|
|
- apt-get install -y --no-install-recommends protobuf-compiler
|
2023-12-17 19:29:37 +05:30
|
|
|
- cargo build
|
2023-12-31 01:38:59 +05:30
|
|
|
- cargo test --lib
|
2023-12-17 19:29:37 +05:30
|
|
|
# - make migrate
|
|
|
|
# - make
|
|
|
|
# - make release
|
|
|
|
# - make test // requires Docker-in-Docker
|
2023-12-31 01:38:59 +05:30
|
|
|
integration_tests:
|
2023-12-31 01:28:43 +05:30
|
|
|
image: python
|
|
|
|
commands:
|
|
|
|
- pip install -r requirements.txt
|
|
|
|
- nohup ./target/debug/main --id 1 --http-addr 127.0.0.1:9001 --introducer-addr 127.0.0.1:9001 --introducer-id 1 --cluster-size 3 &
|
|
|
|
- sleep 1
|
|
|
|
- nohup ./target/debug/main --id 2 --http-addr 127.0.0.1:9002 --introducer-addr 127.0.0.1:9001 --introducer-id 1 --cluster-size 3 &
|
|
|
|
- sleep 1
|
|
|
|
- nohup ./target/debug/main --id 3 --http-addr 127.0.0.1:9003 --introducer-addr 127.0.0.1:9001 --introducer-id 1 --cluster-size 3 &
|
2023-12-31 01:46:44 +05:30
|
|
|
- python tests/test.py
|
2023-12-17 19:29:37 +05:30
|
|
|
|
|
|
|
build_docker_img:
|
|
|
|
image: plugins/docker
|
|
|
|
when:
|
|
|
|
event: [pull_request]
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: mcaptcha/dcache
|
|
|
|
tags: latest
|
|
|
|
|
|
|
|
build_and_publish_docker_img:
|
|
|
|
image: plugins/docker
|
|
|
|
when:
|
|
|
|
event: [push, tag, deployment]
|
|
|
|
settings:
|
|
|
|
username: mcaptcha
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_TOKEN
|
|
|
|
repo: mcaptcha/dcache
|
|
|
|
tags: latest
|
|
|
|
|
|
|
|
# publish_bins:
|
|
|
|
# image: rust
|
|
|
|
# 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
|
|
|
|
# secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
|
|
|
|
#
|
|
|
|
#services:
|
|
|
|
# database:
|
|
|
|
# image: postgres
|
|
|
|
# environment:
|
|
|
|
# - POSTGRES_PASSWORD=password
|