Package: minion-ci
minion-ciis a minimalist, decentralized, flexible Continuous Integration Server for hackers.QuickstartInstallationminion.yml File Formatminion.yml ReceiptsPython virtualenvDockerServer APIQuickstartMaking your repositoryminion compatibleis as easy as running this command in the root of your repository:minion initAfter that you should modify theminion.ymlfile in your repository to fit your needs. Make a nice commit and run the following command to start your first job:git minionIf theminion serversuccessfully started you can browse the web interface athttp://localhost:5000InstallationIt’s recommended to use pip to install minion-ci:pip3 install minion-ciMongoDB:To persist the job dataminion-ciuses MongoDB.
Make sure you have MongoDB installed …apt-get install mongodb
yum install mongodb… and an instance is running:ps -ef | grep mongod… eventually start one with:mongodminion.yml File FormatTheminion-ciserver will clone your repository and parse a file calledminion.ymllocated
in the root of the cloned repository. The format is really simple:# command which is run before the real commandprecondition:"echo'Iwasrunbeforethetest...'"# the test commandcommand:"echo'Thisismytest...'"on:# command which is run if the command was successfulsuccess:"echo'Iwasrunbecausethetestwassuccessful...'"# command which is run if the command failedfailure:"echo'Iwasrunbecausethetestfailed...'"minion.yml ReceiptsThe following few sections explain how to setup aminion.ymlfile for different
kind of environments and technologies, like python virtualenvs, docker containers, etc.Why so complicated?… Well it’s not really complicated, isn’t it? There are just to many
different styles of test environments and approaches … I don’t want to give full attention to all
of them and support them.
And anyway … In the end your Use-Case wouldn’t be supported. Thus, we provide each developer the full
control over their own test setup and environment. Setup it up how you like and run your test how you like it.But: Here are some receipts which might help you to come up with a nice minion.yml configuration:Python virtualenvTo test your code in a python virtualenv base your minion.yml on the following example:precondition:>/bin/bash -c 'virtualenv env -p python3.4 &&source env/bin/activate && python -m pip install . -r requirements-dev.txt'command:/bin/bash -c 'source env/bin/activate && make test'Make sure you change the actualtestcommand which in the example’s case ismake test.
You can also easily integrate it withtox. Just make suretoxis installed and run as your
test command.DockerTo test your code in a docker container follow the following example to setup your minion.yml:precondition:/bin/bash -c 'docker pull ubuntu'command:/bin/bash -c 'docker run -t ubuntu /bin/bash -c "make test"'This will pull a new ubuntu docker image from docker hub and runmake testin the container.
You might want to setup your own docker image in thepreconditionand the run this container
in the actualcommand:precondition:/bin/bash -c 'docker build -t testing .'command:/bin/bash -c 'docker run -t testing /bin/bash -c "make test"'Make sure you mount your repository, source code, test code or whatever in the container before running
any tests.Server APIRouteHTTP MethodParameterDescription/statusGETGet status of the server/jobsGETpage,
page_sizeGet a list of all jobs/jobsPOSTrepo_url,
commit_hash,
branch,
keep_data,
arbitrary dataCreate a new job/jobsDELETERemove all jobs/jobs/<job_id>GETGet a single job/jobs/<job_id>DELETERemove a single job/stopPOSTStop the minion-server