Skip to main content

Forge Environment

Provides access to Forge execution context data (user, workspace, agent, execution, etc.) and script arguments.

Examples

// Print execution information
print("Execution ${execution_id} triggered by ${user_id} inside ${workspace_id} running on ${agent_id}.")
// Read script arguments
var mode = get_arg("mode", as_string, "default")
var retry_count = get_arg("retries", as_integer, 3)

Global Constants

NameDescription
agent_idThe identifier for the agent executing the script.
execution_idThe unique execution identifier (or job identifier when running inside a job).
user_idThe identifier for the user that launched the current execution.
workspace_idThe identifier for the workspace where the current execution takes place.

Module Functions

NameDescription
get_argReturns the named script argument.