ADVANCED usage ¶
- Troubleshooting
- Loading priority
- Tasks development - more examples
- Global environment variables
- Custom distribution
-
Tasks API
- Each task must implement a TaskInterface (directly, or through a Base Task)
- To include a task, wrap it in a declaration
- To create an alias for task or multiple tasks
- Execution context provides parsed shell arguments and environment variables
- Interaction with input and output
- Storing temporary files
- Parsing RKD syntax
- Testing
- Working with YAML files
- Creating installer wizards with RKD
-
Best practices
- Do not use os.getenv()
- Define your environment variables
- Use sh() and exec() to invoke commands
- Do not print if you do not must, use io()
- Use tasks expansion or pipelines instead of dynamic tasks creation in Makefile
- Invoke RKD subtasks as a pipeline or tasks expansion
- Don’t mix dependencies between subprojects - rethink project structure
- Keep compilation and configuration stage fast
- Use configuration stage for validation
- Process isolation and permissions changing with sudo
- Docker entrypoints under control
- Testing with PyTest
- org.riotkit.rkd/yaml/v1 schema