This is Pieter, a bear (yes, a bear) and a super-lightweight CI.
One day you could realize that number of great tools doesn't fully suit simple idea: to provide lightweight private CI.
- TeamCity and Jenkins are way too heavy
- Travis not suitable when one needs privacy
- Drone is container-oriented so sometimes an overhead
- ...
There are many other solutions, but it was hard to find one good enough to rapidly deploy and use in a minute or two.
So meet the Pieter CI!
Pieter pronounces more like St. Petersburg in short form, not like a person's name.
- Lightweight, daemon would never consume more than couple percents of your CPU
- Compact, tool designed to solve one and only issue: executing predefined jobs on demand
- Easy, absence of complex stuff and overmanagement makes deploy, learning and usage questions of minutes
Some ways to run Pieter CI:
Using docker-compose:
docker-compose up
Run as standalone containers isolated in private network:
docker network create pieter
docker run -d --name redis \
-p 6379:6379 \
--network pieter \
-v $(pwd)/data:/data \
redis
docker run -d --name pieter-ci \
-p 8000:8000 \
--network pieter \
agrrh/pieter-ci:stable
Run locally for test purposes, development or containers-free setup:
# First, run redis in your way of choice
source misc/local.env
./pieter
http http://127.0.0.1:8000/
All required libraries could be installed with:
pip3 install -r requirements.txt
You could customize env variables to configure the software, these are defaults:
PIETER_DB_HOST=redis
PIETER_DB_PORT=6379
Shows where to seek for DB.
PIETER_API_HOST=0.0.0.0
PIETER_API_PORT=8000
These options point API on which address/port to listen.
Those examples are using awesome httpie.
Repository is an object you want to interact with.
This could be code repository to build application from or just a webpage to download on specific events.
http GET http://0.0.0.0:8000/repos
http PUT http://0.0.0.0:8000/repos/pieter [email protected]:agrrh/pieter-ci.git
http GET http://0.0.0.0:8000/repos/pieter
http DELETE http://0.0.0.0:8000/repos/pieter
Scenario is some item related to "build" object. Set of rules which would be applied to repository when requested.
http PUT http://0.0.0.0:8000/repos/pieter/build.sh < misc/test_script.sh
http GET http://0.0.0.0:8000/repos/pieter/build.sh
http DELETE http://0.0.0.0:8000/repos/pieter/build.sh
http PATCH http://0.0.0.0:8000/repos/pieter/build.sh
http GET http://0.0.0.0:8000/jobs/${JOB_ID}
http DELETE http://0.0.0.0:8000/jobs/${JOB_ID}
- Kirill K - author