To be able to trigger Bolt using the API, you will first need to generate API keys for your workspace. Got to account settings and generate your API keys, make sure to save in your password manager:
API key
API secret
API Endpoint
You will need this later when setting up the secrete in BitBucket pipelines.
# Specify the base Docker image to use for all pipeline steps
image: python:3.11
# Define reusable pipeline steps
definitions:
steps:
# Create a reusable step template using YAML anchor (&)
- step: ¶dime-continuous-deployment
# Name of this pipeline step for identification
name: Paradime Continuous Deployment
# Commands to execute in this step
script:
# Export required Paradime environment variables
- export PARADIME_API_KEY=$PARADIME_API_KEY
- export PARADIME_API_SECRET=$PARADIME_API_SECRET
- export PARADIME_API_ENDPOINT=$PARADIME_API_ENDPOINT
# Install Paradime Python SDK
- pip install paradime-io==4.7.1 # Check for latest version of the Paradime Python SDK on https://github.com/paradime-io/paradime-python-sdk/releases
# Run the Paradime bolt schedule and wait for completion
- paradime bolt run "continuous_deployment_run" --wait
# Specify compute resources for this step
size: 2x # Double the default resources
# Set maximum execution time in minutes
max-time: 60
# Define when and how pipelines should run
pipelines:
branches:
# This pipeline will only run when changes are pushed to the main branch
main:
- step:
# Reference the template step defined above using YAML alias (*)
<<: *paradime-continuous-deployment
# Define environment variables needed for this step
# These should be configured in Bitbucket repository settings
variables:
API_KEY: PARADIME_API_KEY # API key for Paradime authentication
API_SECRET: PARADIME_API_SECRET # API secret for Paradime authentication
API_ENDPOINT: PARADIME_API_ENDPOINT # Paradime API endpoint URL