Environment variables

The following environment variables are always available to packets and modules.

If you need other variables, then you can specify them through a packet file or through module files.

If you need the full directory of a module. Then you can create a file “init.sh” in the root of the module with the following line:

export MYCUSTOMMODULE_DIRECTORY="$(pwd)";
Variable Description
APPLICATION_USER The username of the currently logged in user.
INTERACTIVE "true" or "false". Indicates if the action was triggered through the UI or through a schedule or REST-call. User-feedback can only be requested if this value is "true".
WORKFLOW This variable contains the name of the current workflow. Only defined if an action is running as part of a workflow.
RUN_GUID Global unique ID for the current run. This value is the same for all actions when running a workflow. Useful to store and retrieve state for the current run.
MODULES_ROOT The directory to the root of the modules. Typically $INFRAXYS_ROOT/modules.
PACKET_GUID Value of the "Packet GUID"-attribute for the currently running action.
environment_directory Escaped directory name of the environment with the database id as the suffix because there can be multiple environments with the same name under different projects.
container_directory Escaped directory name of the container
instance_directory Escaped directory name of the instance with the database id suffixed because instances with the same name can exist on a container.
thread_number default 1, but when running in parallel, this is incremented by one per thread
provisioning_server_docker_image The Docker image name and tag of the container where the action is running under. This value can be overridden by creating a packet file called "overrides" and specifying another value for this environment variable.
provisioning_server The hostname of the provisioning server as it was used to connect from the application server to the provisioning server.
action_label The value of the action's context-menu.
instance_label The label of the instance as shown in the instance tree on the container.
container_name Name of the container of the current action.
environment_name Name of the environment of the current action.
project_name Name of the project of the current action.
command_line The command line used to start the action. Typically the name of the packet file.