Documentation ¶
Overview ¶
Package buildcel provides go/cel support for Build proto.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
Bool is a CEL program to evaluate a Build message against a list of bool expressions.
Currently it can support checking if: * build has a field, e.g. `has(build.tags)`, * input/output properties has a key, e.g. `has(build.input.properties.pro_key)` * an input/output property with key "key" has "value": `string(build.output.properties.key) == "value"`
- Note: because input/output properties are Struct, we have to cast the value to string.
* experiments includes an experiment, e.g. `build.input.experiments.exists(e, e=="luci.buildbucket.exp")` * tags includes a tag with key "key", and there are two ways:
- `build.tags.get_value("key")!=""`
- `build.tags.exists(t, t.key=="key")`
type StringMap ¶
type StringMap struct {
// contains filtered or unexported fields
}
StringMap is a CEL program to return the requested information of a Build message in a string map.
Currently it can support getting values for: * value of any build string field, e.g. `build.summary_markdown` * value of an input/output property, e.g. `string(build.input.properties.key)`
- Note: because input/output properties are Struct, we have to cast the value to string.
* value of a tag, e.g. `build.tags.get_value("key")`
func NewStringMap ¶
NewStringMap generates a CEL program to evaluate a Build message against a string map. The values of the map can be either a CEL expression for the build which should output a string, like `build.summary_markdown`, or a string literal like `"random string literal"`.