RPC Server for continuous integration
Rust (>=1.55.0)
- Build project:
cargo build
with environment variables. - Start server:
./target/release/ago-ci-rpc
.
Environment Variable | Description | Example |
---|---|---|
CI_REPO |
URL to git repository with services | https://git.site.com/user/ci.git |
SECRET_TOKEN |
Secret token for authorization | qwerty123 |
For all methods authorization is required.
Example:
Authorization: qwerty123
GET /container/update
Update local git repository with services.
Example:
GET /contaner/update
Accept: application/json
Authorization: qwerty123
GET /container/{container-name}/deploy/{container-tag}
Deploy {contaner-name}
container with {conatner-tag}
tag.
Example:
GET /contaner/ago-backend/deploy/master
Accept: application/json
Authorization: qwerty123
Example of {CI_REPO}
structure:
├── ago-backend
│ ├── service.yml
Example of ./ago-backend/service.yml
:
version: '3.8'
services:
ago-backend:
image: registry.site.com/ago-backend:${CI_TAG}
deploy:
mode: replicated
replicas: 1