RKD - RiotKit DO. Task executor - balance between Makefile and Gradle. Written in Python. Powerful tool for every DevOps. Automates production tasks as well as local development tasks
Add a possibility to extend tasks in YAML, in Python just extend class inside Makefile as usual.
Add visibility attribute to TaskDeclaration, so the :task task can hide internal "intermediate" tasks - add optional switch "--private" in :tasks to see such tasks
Add configure() inside TaskInterface and in YAML, that would be a Python code executed right after constructor. Create a "configuration" stage for tasks and execute it before argparse. It's a place without Context access, just the class object to set attributes, settings.
Add inside() Python method and YAML element. It should be invoked by execute() method and supported by task. Depending on the task it could be a bash/php/other language code executed inside docker container, Python code executed in context of a Task or everything else - Task that is extended decides about the implementation.
tasks:
:test:in-docker:
extends: rkd.standardlib.BaseInDocker
visibility: private
# executes, right after task is constructed, before argparse and execution
configure: |
this: rkd.standardlib.BaseInDocker
this.set_argument('--image', 'alpine:3.12') # argparse arguments
this.set_image('alpine:3.12') # internal arguments/variables
# executes when task is executed. Handled and supported inside of execute() method of a task. Not all tasks may implement this.
inside: |
ps aux
uname -a
visibility
attribute toTaskDeclaration
, so the:task
task can hide internal "intermediate" tasks - add optional switch "--private" in :tasks to see such tasksconfigure()
inside TaskInterface and in YAML, that would be a Python code executed right after constructor. Create a "configuration" stage for tasks and execute it before argparse. It's a place without Context access, just the class object to set attributes, settings.inside()
Python method and YAML element. It should be invoked byexecute()
method and supported by task. Depending on the task it could be a bash/php/other language code executed inside docker container, Python code executed in context of a Task or everything else - Task that is extended decides about the implementation.