Autopilot Execution Context#
Autopilots are executed as subprocesses. This page explains how these subprocesses are executed and how the results from the subprocesses are evaluated.
Autopilot scripts are called as a /bin/bash -c
script. Other shells are not supported today.
Inside the script, usually one or more autopilot apps are called.
The autopilot’s inputs are variables or configuration files while the output is done by JSON lines or files.
See below for more information on Autopilot Inputs or Outputs.
Autopilot Inputs#
The autopilot script and the autopilot apps can make use of dynamic input data, for example:
Configuration files, which are used for some autopilot apps.
Environment variables, which might originate from different sources, see chapter Environment Variables.
Secrets to provide credentials or other confidential information to an autopilot app, see chapter Secrets.
Run variables, in case you have a dynamically configurable config file, see chapter Run Variables for more details.
Configuration Files#
All configuration files which are contained in the configuration are accessible in the current working directory of an autopilot script.
Attention
Every autopilot which is called from a check is executed in a dedicated folder, one folder per check. This is necessary to separate the inputs and outputs of one check from the data of another check.
Thereby the autopilot script must not access anything outside of that directory. Files and folders should only be stored in the current working directory.
Environment Variables#
Inputs to autopilot scripts are usually passed using environment variables. These environment variables can be configured in the main config file.
Run variables#
Run variables are configuration variables that can be used to parameterize the configuration. For more information, see Run Variables.
Secrets#
Secrets are passwords or access tokens.
They must not be stored inside the qg-config.yaml
file.
Instead, they can be stored as service secrets.
See chapter Secrets for more details.
Autopilot Outputs#
An autopilot usually evaluates documents or other artifacts. The result of the evaluation is then passed on to Yaku. This happens via specially formatted text lines on the standard output of the autopilot.
You can read more on the format of those text lines in Autopilot Output as JSON Lines
Often, an autopilot creates files or directories. Any file or subdirectory in the working directory will be stored as evidence and can later be downloaded from the run result.