Taskotron Quick Start

Install

Install libtaskotron:

sudo dnf install libtaskotron

See libtaskotron modules for more information on installing individual modules.

The runner needs write access into system-wide locations on the filesystem, and so any user who wants to run a task needs to be added to the taskotron group. Use this command command:

sudo usermod -aG taskotron <user>

Note

The user must log out and back in in order for the new group assignment to take effect.

Run

Libtaskotron runner is called runtask. The basic command line has the following structure:

runtask --item <item> --type <type> <task_formula>
<item>
The “thing” under test, e.g. NVR of an RPM, update ID, compose ID, etc.
<type>
The type of <item>. See Input for more details.
<task_formula>
A file describing which steps should be performed when running this task. The file is usually called runtask.yml. You’ll find it in the task’s git repository.

Some tasks also require --arch <arch> to test a specific architecture only. See runtask --help for full commandline syntax.

Usually, you’ll see the correct input arguments in a log of an already executed tasks, so that you can easily replicate them, or an example should be mentioned in that task’s readme file.

Note

By default, runtask will attempt to execute tasks locally. More command line flags are needed in order to run this remotely, see Using remote machines. If you want your task to be executed in the official production environment, you need to contact its maintainers. For Fedora, see Contact us.

Task formula: General syntax

name: polyjuice potion
desc: potion that allows to take the form of someone else
maintainer: hermione

input:
    args:
        - var1   # supported args:
        - var2   # arch, koji_build, bodhi_id, koji_tag, ...

environment:
    rpm:
        - dependency1   # libtaskotron installs these when in production or --local mode,
        - dependency2   # otherwise users are expected to install them on libtaskotron machine

actions:
    - name: pick fluxweed on a full moon
      directivename:              # e.g. koji, bodhi, python, shell, ...
          arg1: value1
          arg2: ${some_variable}  # e.g. ${var1}
      export: firststep_output    # export to a variable usable later

    - name: next step of formula
      nextdirectivename:
          arg1: ${firststep_output}

See Writing Taskotron Tasks for more details on how to write a task formula.

Examples

task-rpmlint

A very simple task from which you can learn all the basics. See its source code.

Run the task like this (replace the example NVR with the build you want to test):

runtask --item htop-2.0.2-1.fc25 --type koji_build task-rpmlint/runtask.yml

Other examples

Some more real-world tasks include:

You can also check our example tasks (warning, some of them might be out of date) or all the rest of the tasks on bitbucket and pagure (projects starting with task-).