Bolt

Overview

The Bolt module allows you to easily manage and control Bolt schedules and runs within your workspace.

It provides tools to create, configure, and monitor schedules, automate tasks, and access detailed logs and reports.

List Bolt schedules

Get a list of Bolt schedules. The list is paginated. The total count of schedules is also returned.

schedule_name (str): The name of the Bolt schedule. Must be exact schedule name.

offset (int): The offset value for pagination. Default is 0. Must be >= 0.

limit (int): The limit value for pagination. Default is 50. Must be between 1 and 1000.

# First party modules
from paradime import Paradime

# Create a Paradime client with your API credentials
paradime = Paradime( api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")

# List all schedules
schedules = paradime.bolt.list_schedules().schedules

Get latest runs for a schedule

offset (int): The offset value for pagination. Default is 0.

limit (int): The limit value for pagination. Default is 100.

show_inactive (bool): Flag to indicate whether to return inactive schedules instead of active schedules. Default is False.

Triggering a Bolt run

Triggers a run for a given schedule name.

schedule_name (str): The name of the schedule to trigger the run for.

commands (Optional[List[str]]): The list of commands to execute in the run. This will override the commands defined in the schedule. Defaults to None.

branch (Optional[str]): The branch or commit hash to run the commands on. Defaults to None.

pr_number (Optional[int]): The pull request number to associate with the run. Defaults to None.

Trigger a run with default commands and branch

Trigger a run with a custom git branch and PR Number

Trigger a run with custom commands

Trigger a run with a custom git branch

Cancelling a Bolt run

Cancels a Bolt run.

run_id (int): The ID of the run to cancel.

Getting a Bolt run artifacts

Get latest run manifest.json

Retrieves the latest manifest JSON for a given schedule.

schedule_name (str): The name of the schedule.

command_index (Optional[int]): The index of the command in the schedule. Defaults to None.

Get latest run artifacts URL

Retrieves the URL of the latest artifact for a given schedule.

schedule_name (str): The name of the schedule.

artifact_path (str): The path of the artifact.

command_index (Optional[int]): The index of the command in the schedule. Defaults to searching through all commands from the last command to the first.

Last updated

Was this helpful?