Specificity with git.fileContents()
Using this command, we can't see if there's any type of file (e.g. YAML) — because of how Git works, we can only retrieve specific files.
As a workaround, use the tag variable and the service tag:
git.fileExists("myservice" + tag + "yaml")
Custom Data and Reserved Keywords
In a scenario where you have a Service YAML with Custom Data, you should be aware of reserved keywords in CQL and how to work around them. An error message as below will appear if you are attempting to use a reserved keyword.
Excerpt of Custom Data in Service YAML
If you attempt to run a CQL expression using this
oncall keyword, you will encounter a challenge as this keyword is reserved.
CQL expression example that will not function
custom("contacts")?.oncall != null
This will result in an error message: no viable alternative at input 'custom("contacts")?.oncall'
CQL expression to be used instead, note the use of
custom("contacts")?.`oncall` != null
Article is closed for comments.