From da636085365fef26f11163cda5680db6e7e5cbbf Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Apr 09 2019 08:43:04 +0000 Subject: Build state could be specified in MTS rule MTS rule is extended to allow specifying build state in order to tag build on a specific state. Implementation: https://github.com/fedora-modularity/message-tagging-service/pull/54 Signed-off-by: Chenxiong Qi --- diff --git a/drafts/module-tagging-service/format.md b/drafts/module-tagging-service/format.md index 7224b05..7b97b9e 100644 --- a/drafts/module-tagging-service/format.md +++ b/drafts/module-tagging-service/format.md @@ -35,9 +35,10 @@ list is used, it is sufficient if any of the string matches. ## `module` type rule definition We want to be able to match module builds by their name, stream, version, -structured context, and their scratch or development build flags. +structured context, and their scratch or development build flags, or build +state. -All fields are optional. If no definition is provided, we always match for +All fields are optional. If no definition is provided, we always match for that field. A full example of a module rule: @@ -61,14 +62,19 @@ rule: # scratch and development are bools scratch: no development: no + build_state: done ``` -The above could then be tagged with the following: +The above could then be tagged with the following only if build is in `done` +state: ``` destinations: '\g-a-full-name-tag' ``` +If `build_state` is omitted in the rule definition, default build state will be +used to match a module build. + ## Detailed example A full rule definition of Fedora/EPEL examples can be found in `rules.yaml`.