Package: jorun
JorunJorun is a task runner written in python, supporting windows and linux and configurable through a YML fileInstall and runpipinstalljorunUsage# usage: jorun [-h] [--level LEVEL] [--file-output FILE_OUTPUT] configuration_file## A smart task runner## positional arguments:#   configuration_file    The yml configuration file to run## options:#  -h, --help            show this help message and exit#  --level LEVEL         The log level (DEBUG, INFO, ...)#  --file-output FILE_OUTPUT#                        Log tasks output to files, one per task. This option lets you specify the directory of the log files#  --gui                 Force running with the graphical interface#  --no-gui              Force running without the graphical interfacejorun./conf.ymlConfigurationgui:
  panes:
    services:
      tasks:
        - db
        - redis
    terminals:
      tasks:
        - test_1
        - test_2
        - test_3
  palette: hacker
tasks:
  db:
    type: docker
    docker:
      container_name: test
      image: postgres
      docker_arguments:
        - "--rm"
      stop_at_exit: true
      environment:
        POSTGRES_PASSWORD: test
    completion_pattern: .*database system is ready to accept connections.*
    pattern_in_stderr: true
  redis:
    type: docker
    docker:
      container_name: rds
      image: redis
      docker_arguments:
        - "--rm"
      stop_at_exit: true
    completion_pattern: .*Ready to accept connections.*
    pattern_in_stderr: true
    depends:
      - db
  test:
    type: group
    depends:
      - redis
  test_1:
    type: shell
    shell:
      command: echo TEST 1
    depends:
      - test
  test_2:
    type: shell
    shell:
      command: echo TEST 2
    depends:
      - test
  test_3:
    type: shell
    shell:
      command: echo TEST 3
    depends:
      - testThis sample YML file shows three task types you can run:Shell: a task launching a shell commandDocker: a task optimized for docker containersGroup: a task that groups other tasks. Used when you have a lot of tasks with the same dependencies, to avoid writing all of them every timeThe task runner supports searching for a pattern in the task output to
signal its completion. This way you can start a dependent task after the pattern
shows up in the task output.Tasks are chained through dependencies.
The first tasks to run are the ones without dependencies.
If you declare one or more dependencies, the task will not run until all the dependencies are either:completed(i.e. the task finished executing), by defaultthe completion pattern is matched(the regex pattern matched a line of the task output), if you set acompletion_patternlaunched, if you set therun_modetoindefiniteGUIIf you runJorunwith the--guicommand line option, or if you specify theguioption
in the yaml configuration you can start the tool with a graphical interface.
The GUI is still a prototype, but will let you keep track of the task logs individually and
even filter the log rows.Theguisection in the YML configuration is where you can specify the panes you want displayed,
and for each pane you can set the tasks that belong to it and the maximum number of columns visible in the pane.For instance, let's say you have 10 tasks in which you have 4 databases, 4 REST services, and 2 queues.
You then have this GUI configuration:gui:
  panes:
    databases:
      tasks:
        - postgres
        - redis
        - mongo
        - cassandra
      columns: 2
    services:
      tasks:
        - auth
        - orders
        - customers
        - shipments
      columns: 4
    pubsub:
      tasks:
        - rabbitmq
        - kafka
      columns: 1
  palette: hackerThe first pane will display the 4 databases in a resizable grid of 2 rows and 2 columns. The second
pane will display the services in a single row of 4 columns. The last pane will
display the two services in a single column of 2 rows.ReferenceThe options inboldare mandatory, while the others can be omitted.YAML Configuration fileOptionDescriptiontasks(object)a mapping between task names and thetask configurationgui(object)thegui configurationGUI configurationOptionDescriptionpalette(string)apply a specific color palette (seeavailable palettes)panes(object)a mapping between pane names and thepane configurationPane configurationOptionDescriptiontasks(array)the tasks that will be displayed in this panecolumns(integer)the number of columns you want the pane divided intoTask configurationOptionDescriptiontype(string)the task type (shell,dockerorgroup)shell(object)iftypeisshell, theshell configurationdocker(object)iftypeisdocker, thedocker configurationdepends(array)an optional list of task names this task depends onrun_mode(string)wait_completion(default) will wait for the task to finish before launching the next one,indefinitewill launch the next one immediatelycompletion_pattern(string)if therun_modeiswait_completion, a regex pattern that if matched with a line will start the next dependent task(s)pattern_in_stderr(boolean)ifcompletion_patternis specified, whether to search for the pattern in the error outputShell configurationOptionDescriptioncommand(string or array)the command to run, can be a string or a list of command argumentsworking_directory(string)the working directory of the commandenvironment(object)a mapping describing the environment variables to pass to the commandDocker configurationOptionDescriptioncontainer_name(string)the name to give to the containerimage(string)the docker image to rundocker_arguments(array)any additional arguments for thedocker runcommand, to be inserted before the image namedocker_command(array)any arguments to be appended after the image nameenvironment(object)env variables to be passed to the docker containerworking_directory(string)a working directory for the docker command to be run fromstop_at_exit(boolean)will stop the container when the task is closedAvailable color palettesdarcula (default)monokaikimbie-darksolarized-darkhacker