I've been working on this for a bit but finally have enough together
that we can start talking about the task description format for
taskotron.
The code to actually run tasks (well, task. for now, rpmlint is all
that's supported) is up at:
https://bitbucket.org/fedoraqa/libtaskotron-demo
The runner code isn't very good yet but I didn't want to wait until it
was done before starting to discuss the task description format.
Continuing the use of rpmlint as an example, I have a task repository
set up on bitbucket:
https://bitbucket.org/fedoraqa/task-rpmlint
At the moment, that task yaml file for rpmlint [1] looks like:
dependencies:
- rpmlint
- libtaskbot
input:
args: envr,arch
preparation:
koji: download $envr
execution:
python: run_rpmlint.py $workdir
post:
shell: clean $workdir
report:
resultdb: something
[
1]https://bitbucket.org/fedoraqa/task-rpmlint/src/be90c723a11f3cec3a7ee72...
In a nutshell, the idea is to keep repetitive code out of the tasks
without requiring everything to be written in the same language or
porting the library to any language people want to use (perl, c, bash
etc.).
The execution of the task is described in the yml file and eventually
delegates actual execution to the python file described in that yml
file. Output, for now, is in TAP format. The runner just spits it out
as text for the moment but eventually, that TAP output will be used for
reporting the results.
Items prepended with '$' represent variables - either things determined
at runtime (the working directory) or things that are arguments to the
specific task run (the envr of packages to check).
Examples of what future features could look like:
execution:
beaker: job=somejob.xml distro=$latestfedora
preparation:
bodhi: download $updates
preparation:
openstack: image=imagename config=someconfigtype size=m1.small
execution:
infinity: config=test/sometest.cfg
Any thoughts on whether this direction is a good direction to take or
suggestions on how the format could be improved? Eventually, I want to
send this out to devel@ for input but figured that the smaller group of
folks here would be a good start.
Thanks,
Tim