Ick - a continuous integration system ============================================================================= Introduction ----------------------------------------------------------------------------- Ick2 is a CI system. It is not there yet. Installing ----------------------------------------------------------------------------- See `INSTALL`. Hacking ----------------------------------------------------------------------------- Ick2 is written in Python 3 and targets Debian 9 (stretch) or later. There are some unit and integration tests written for the controller's HTTP API. The integration tests can start a local instance of the controller; either of the following works: ./check ./check yarns You can add any command line parameters `yarn` accepts, but you have to specify `local` explicitly: ./check local -v --tempdir tmp --snapshot You can also run the integration tests against an existing remote setup: ./check https://ick-controller ./check https://ick-controller -v --tempdir tmp --snapshot Please make sure at least the local `./check` passes with your changes, before submitting them. Running ----------------------------------------------------------------------------- To run the controller, you should use `./start_ick`. It needs `gunicorn3`. In general, you need all the dependencies from `debian/control` installed to run the controller. After this, `http://localhost:12765` is the controller's base URL, and you can do things like: * `GET http://localhost:12765/projects` — list all projects known to controller * `GET http://localhost:12765/projects/foo/+trigger` — trigger build of project `foo` (substitute name of one of your own projects) * `GET http://localhost:12765/projects/foo/logs/current` — get build log (output) of the currently executing build step of project `foo` * `GET http://localhost:12765/projects/foo/logs/previous` — get build log (output) of the latest finished build step of project `foo` To actually run builds, you need to run `worker-manager`: ./worker-manager --controller http://localhost:12765 The substitute the correct URL for the controller. The icktool utility ----------------------------------------------------------------------------- The `icktool` utility can generate a token. To configure: create `~/.config/icktool/icktool.yaml` with the following content: config: controller: https://ick-controller token-private-key-cmd: pass show ick-controller/token_key Alternatively, you can use the command line options with the same names. To use: icktool token icktool version Icktool will gain more functionality in the future. Using the .deb package ----------------------------------------------------------------------------- To build the .deb package (you may have to fix the version number): git archive HEAD | xz > ../ick2_0.2.1+git.orig.tar.xz debuild -us -uc sudo debi After this, you'll want to create `/etc/ick2/projects.yaml`, for example: projects: count: shell_steps: - for x in $(seq 100); do echo hello, $x; sleep 1; done Also, you'll want to enable and start the ick2 service: sudo systemctl enable ick2 sudo systemctl start ick2 After this: curl http://localhost:12765/projects curl http://localhost:12765/projects/count/+trigger ./worker-manager http://localhost:12765 Good luck! Code of conduct ----------------------------------------------------------------------------- Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See the file code-of-conduct.md for the code. Legalese ----------------------------------------------------------------------------- While Ick2 itself is under the AGPL3+ license, a copy of which is included as `COPYING` in the source code of this program. This license does NOT apply to clients of the HTTP API it provides. Copyright 2017-2018 Lars Wirzenius This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see .