Skip to content

Configuration via environment variables

The console agent parameters can be configured via environment variables. The configuration file structure is used for configuration via environment variables.

Formation of environment variables

  1. Variable prefix: All environment variables begin with the JOHNNY_ prefix.
  2. Section path: The variable is formed based on the section path in the configuration file. Section separators are replaced with the _ symbol.
  3. Symbol replacement: The "." and "-" symbols in section names are also converted to the _ symbol.

Example

Let's look at an example of setting the block-on-empty-result flag to block the build when an empty result is received:

  • Path in the configuration file: scan.general.block-on-empty-result;
  • Environment variable: JOHNNY_SCAN_GENERAL_BLOCK_ON_EMPTY_RESULT;

Thus, to change the value of this parameter through environment variables, you need to set the variable JOHNNY_SCAN_GENERAL_BLOCK_ON_EMPTY_RESULT with the desired value.

Priority of settings

Since the agent startup parameters can be configured in three ways, when using several methods simultaneously, the agent will accept parameters in the following order of priority:

  1. Value of the command flag;
  2. Value of the environment variable;
  3. Value in config file.