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
| Name | Description |
|---|---|
| agent_id | The identifier for the agent executing the script. |
| execution_id | The unique execution identifier (or job identifier when running inside a job). |
| user_id | The identifier for the user that launched the current execution. |
| workspace_id | The identifier for the workspace where the current execution takes place. |
Module Functions
| Name | Description |
|---|---|
| get_arg | Returns the named script argument. |