baur icon indicating copy to clipboard operation
baur copied to clipboard

Support to assign tags to apps and tasks

Open fho opened this issue 5 years ago • 0 comments

Support to assign multiple tags to apps and tasks and filter for those in apps task commands. The tags can be used for:

  • filtering app when listing them, this can be useful if the app list is used as inputs for other scripts -some tasks could be OS dependent, they could be tagged with the OS name and on the CI machines only the tasks with the fitting tag can be run (Originally posted by @maktouch in https://github.com/simplesurance/baur/issues/94#issuecomment-577102838)

Tags can be specified on app and task level in the config files. Tags that are specified for on app level are inherited by all tasks of an app.

Output of commands can be filtered by tags via a --filter parameter similar to the one implemented in docker (https://docs.docker.com/engine/reference/commandline/ps/#filtering). Examples:

  • baur ls apps --filter "tags=service,windows" -> list all apps that have >=1 tasks with the tags service and windows
  • baur run --filter "tags!=windows" -> run all tasks that do not have a windows task

Existing commands like baur ls builds that have parameters for filtering output should be adapted to use the same --filter syntax.

fho avatar Jan 29 '20 10:01 fho