Metadata

The Metadata plugin module enables the ability to add metadata to the projects that can be exposed to job environment.

Requires the Jenkins Metadata Plugin.

Component: metadata
Macro

metadata

Entry Point

jenkins_jobs.metadata

Example:

metadata:
  - string:
      name: FOO
      value: bar
      expose-to-env: true
class metadata.Metadata(registry)
gen_xml(xml_parent, data)

Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.

Parameters
  • parser (YAMLParser) – the global YAML Parser

  • xml_parent (Element) – the parent XML element

  • data (dict) – the YAML data structure