Loading priority¶
Environment variables loading order from .env and from .rkd¶
Legend: Top is most important, the variables loaded on higher level are not overridden by lower level
- Operating system environment
- Current working directory .env file
- .env files from directories defined in RKD_PATH
Environment variables loading order in YAML syntax¶
Legend: Top - is most important
- Operating system environment
- .env file
- Per-task “environment” section
- Per-task “env_file” imports
- Global “environment” section
- Global “env_file” imports
Order of loading of makefile files in same .rkd directory¶
Legend: Lower has higher priority (next is appending changes to previous)
- *.py
- *.yaml
- *.yml
Paths and inheritance¶
RKD by default search for .rkd directory in current execution directory - ./.rkd.
The search order is following (from lower to higher load priority):
- RKD’s internals (we provide a standard tasks like :tasks, :init, :sh, :exec and more)
- /usr/lib/rkd
- User’s home ~/.rkd
- Current directory ./.rkd
- RKD_PATH
Custom path defined via environment variable
RKD_PATH allows to define multiple paths that would be considered in priority.
export RKD_PATH="/some/path:/some/other/path:/home/user/riotkit/.rkd-second"
How the makefiles are loaded?
Each makefile is loaded in order, next makefile can override tasks of previous. That’s why we at first load internals, then your tasks.
Tasks execution¶
Tasks are executed one-by-one as they are specified in commandline or in TaskAlias declaration (commandline arguments).
rkd :task-1 :task-2 :task-3
- task-1
- task-2
- task-3
A –keep-going can be specified after given task eg. :task-2 –keep-going, to ignore a single task failure and in consequence allow to go to the next task regardless of result.