Skip to main content
A value filled in later is written as a template: a string holding {{ expression }}. BlobHub has no other placeholder syntax. The same templates fill a listener’s target, a workflow component’s object alias, the text.render_template component and, at install, an app’s manifests.

What a template is

  • The language is the platform’s sandboxed Jinja. Expressions go in {{ … }}; where a string is text, statements ({% … %}) and comments ({# … #}) work too.
  • Every string leaf of a JSON or YAML value in a templated place is a template. A string with no marker renders to itself.
  • A lone expression keeps its type. A string that is exactly one {{ … }} yields the expression’s own JSON value, so "{{ inputs.config }}" is the document, not its text. Anything else yields text.
  • One moment and one set of names per place. Each place a template may appear says when it is rendered and which top-level names exist then. A name outside that set is refused when the document is saved, naming the set.
  • The platform renders, in one sandboxed renderer, within its bounds. No client renders a template.
  • Literal braces are written inside {% raw %} … {% endraw %}.

Places

The names of the two moments are disjoint, so a template written for the wrong moment is refused instead of rendered: a manifest naming event or execution is refused when the version is committed.

Install-time names

  • Only manifests render at install, and in app.yaml only a credential’s body. The files a manifest names, a definition’s or an object’s file, are copied as they are, so a listener’s own {{ event.… }} inside a definition reaches run time untouched.
  • Blobs are applied in the order their templates need. A blob that reads blobs.flows follows flows, so Field Reports’ schedules, whose target is "{{ blobs.flows.id }}", is applied after flows. Otherwise folders go in name order, and folders that read each other’s blobs in a cycle are a problem.
  • A secret is read only by a credential’s body. A body reads inputs, accounts and installation, not blobs: an install writes credentials before it makes any blob. A secret read anywhere else, or blobs read in a body, is a problem at commit.
  • An optional input left out skips the nearest list item whose template reads it: a credential, an object, a definition, a limits entry, or one module of an entry’s includes. An item inside another skipped item goes with it, and the plan names only the outer one. The plan says so in a skips … line, one of skips credential <alias>: <input> was not given, skips <list item> <alias> in blob <blob>: <input> was not given, skips limit <id> in blob <blob>: <input> was not given, skips a module of limit <id> in blob <blob>: <input> was not given, skips an item of <list item> <alias> in blob <blob>: <input> was not given or skips an item of <path> in blob <blob>: <input> was not given. An item with a string alias is named by it, with its list’s name minus a final s as <list item>. One without is named by the nearest aliased item around it, else by its path (Lines).

What is not a template

  • Where the CLI reads a value from. --input name=@file and --input name=env:VAR are where blobhub installer install reads an input’s value from, not a syntax inside any document.
  • A reference object. {org, blob, revision, session, definition} names a thing; a template may fill one of its parts, as "{{ blobs.flows.id }}" fills a schedule target’s blob.
  • A workflow’s ports and connections, which carry values between components.