Skip to content

Environment Variable

Definition of a Variable on environment level, the following properties are supported:

Key Value Description Note
name string The name of the variable
value string The variable value

Jsonnet Function

orgs.newEnvVariable('<name>') {
  <key>: <value>
}

Validation rules

  • None

Example usage

orgs.newOrg('OtterdogTest') {
  ...
  _repositories+:: [
    ...
    orgs.newRepo('test-repo') {
      ...
      environments: [
        orgs.newEnvironment('linux') {
          ...
          variables+: [
            orgs.newEnvVariable('TEST_VARIABLE') {
              value: "TESTVALUE",
            },
          ],
        },
      ]
    }
  ]
}