rumi is a container based job execution platform. It reads and executes
jobs that are defined in a
.rumi.yml file in a project. The goal is it
to make job execution more flexible and put the responsibility for
configuration in projects into the maintainer’s hands.
CI jobs are grouped into stages which are executed sequentially. The jobs in each stage are executed in parallel. A failed job aborts the complete build.
stages: Initialisation: Install npm dependencies: ... Install composer dependencies: ... Tests: Unit tests: ... Integration tests: ... CSS lint: ...
The above example illustrates how jobs can be grouped into stages. "Install npm dependencies" and "Install composer dependencies" are executed at the same time. Once all jobs in the given stage are finished, the next stage is started.
You can define an unlimited amount of stages and jobs. You should try to make stage and job names self-explanatory.
... Job name: docker: // docker-compose syntax commands: // optional - command one - command two entrypoint: sh // optional ci_image: name_of_the_container // optional timeout: 100 // in seconds, default 1200
- docker (required): docker-compose syntax (https://docs.docker.com/compose/compose-file/) used to start a set of the containers. Can be either
yamldefinition or path to
- commands (optional, default: image defined command): if defined, the command will be triggered inside the container. If empty - default docker image command will be used.
- entrypoint (optional, default: image defined entry point): equivalent to Docker entrypoint option.
- ci_image (optional, default: first defined container): in case you don't want to use first defined container as your CI job, you can specify a name for the custom container here.
Job is marked as failed if return status of ci_image is other then zero.
Available environment variables
Rumi injects following environment variables on the test runtime to your test container:
- GIT_COMMIT - contains current commit sha
- GIT_BRANCH - contains current branch name
- GIT_URL - contains url used to checkout the code
Port configuration in the
ymldefinition is discarded. CI jobs are not able to expose ports. This is likely to change in the later versions. In case you need communication between your containers link Docker containers with each other.
buildflag from docker-compose syntax is not supported. You need to pre-build your image, push it to registry and use it with
How can i execute jobs locally?
- Use below code to download and install rumi
wget https://raw.githubusercontent.com/trivago/rumi/master/rumi mv rumi /usr/local/bin/rumi chmod +x /usr/local/bin/rumi
https://raw.githubusercontent.com/trivago/rumi/master/rumi.bat and put it in your system PATH
- Run the
rumicommand in your project directory (where the
.rumi.ymlfile is located).