Skip to content
/ esioci Public

esioci is a new generation Continuous Integration system.

License

esioci/esioci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#esioci

EsioCi is an OpenSource Continuous Integration software

Build Status Coverage Status Deps Status codebeat badge

Requirements

  • Elixir >= 1.2
  • OTP 19
  • PostgreSQL database
  • Redis database

How To Use

Installation and Configuration

  1. Download source code
  2. Configure application via ENV variables
  3. ESIOCI_API_PORT => port witch esioci starts, default is 4000
  4. ESIOCI_DB => database name, default is "esioci"
  5. ESIOCI_DB_USER => database user
  6. ESIOCI_DB_PASSWD => database password
  7. ESIOCI_DB_HOST => database host
  8. ESIOCI_POLLER_NTERVAL => poller run interval in ms, default 60000
  9. Set artifacts directory, default is /tmp/artifacts
  10. Create database: HINT: You can run dev database instance in docker: docker run --name some-postgres -p 5432:5432 -d postgres
  11. Run migration mix ecto.migrate
  12. Seed database mix run priv/repo/seeds.exs
  13. Run application screen iex -S mix run
  14. Configure github push webhook and point it to address:port/api/v1/default/bld/gh

Configuration file

All app configuration in config/config.exs, see comments for details

esioci.yaml

esioci.yaml file is a file with all builds configuration. This file should be placed in your's repository root.

Example esioci.yaml:

---
build:
  - exec: "cmd1"
  - exec: "cmd2"
artifacts: "artifacts_file.txt"

yaml commands:

  • build: master build configuration
  • exec: command to execute, supports multiple commands. Each command will be execute in order from up to down in file.
  • artifacts: one file or directory, or pattern to copy to artifacts directory

API endpoints

GET api/v1/project_name/bld/last

Returns json with last build status for project: project_name

GET api/v1/project_name/bld/build_id

Returns json with specific build

GET api/v1/project_name/bld/all

Returns json with all builds for specific project

GET api/v1/project_name

Returns json with information about specific project

GET api/v1/projects/project_id

Returns json with information about project with id

GET api/v1/projects/all

Returns json with information about all project

POST api/v1/project_name/bld/gh

Run github project

GET artifacts/build_id/build_build_id.txt

Get build log.

How To Develop

Run app first time

  1. get dependencies mix deps.get
  2. compile mix compile
  3. Run docker images with psql and Redis
  4. docker run -p 5432:5432 -d postgres:10.2
  5. docker run -d -p 6379:6379 redis
  6. Create database mix ecto.create
  7. Migrate database mix ecto.migrate
  8. Seed database mix run priv/repo/seeds.exs
  9. run iex -S mix run

Unit tests

  1. Prepare test database
  2. MIX_ENV=test mix ecto.create
  3. MIX_ENV=test mix ecto.migrate
  4. MIX_ENV=test mix run priv/repo/seeds.exs
  5. Run unit tests and generate html coverage report mix coveralls.html
  6. Coverage html report in cover directory

Changelog:

v0.6 - 12.03.2017

  • Other
    • Add pooling, now projects in database has repository collumn. EsioCI polls that repository and builds if detect changes.
    • Fix code style.
    • Upgrade elixir and hex packages.

v0.5 - 27.09.2016

  • API
    • get build log
  • Other
    • EsioCi.Builder module refactoring, add test, increase code coverage
    • save build log to file in addition to standard application log

v0.4.1 - 4.09.2016

  • Fixes
    • fix problem with build continues if step fails
    • fix esioci.yaml file

v0.4 - 24.08.2016

  • API
    • add support for bitbucket
  • YAML
    • basic support for artifacts, esioci copies files to /tmp
  • Fixes
    • fix run_cmd if cmd directory doesn't exist
    • fix non deterministic unit tests
  • Other
    • Enable logging to file, by default all log comes to debug.log

v0.3 - 10.08.2016

  • API
    • get all builds from project
    • get all projects
    • get project by id
  • YAML
    • run multiple exec from one esioci.yml file
  • Fixes
    • Bug with build stuck in RUNNING state if parse yaml fails
    • Bug with parse only one command from esioci.yaml

v0.2 - 30.07.2016

  • API
    • get build by id
    • get project by name
  • Improvement code quality and code coverage

v0.1 - 24.07.2016

  • Support for github requests
  • exec() command in esioci.yaml
  • API
    • check last build status via api

Authors

Grzegorz "esio" Eliszewski - http://esio.one.pl