GitHub Native Continuous Deployment

Paradime Bolt offers a powerful GitHub-native Continuous Deployment (CD) feature that automatically deploys changes to your production environment as soon as they're merged into your production branch.

Key features:

  • Triggers every time a pull request is merged into your specified git branch (e.g., main)

  • Ideal for CI/CD workflows

  • Increases the speed of deploying changes to production

  • Refreshes or creates tables immediately after code changes are merged

Prerequisites

Before setting up GitHub Native Continuous Deployment with Bolt, ensure you have:

  1. A production data warehouse connection in Paradime.

  2. GitHub app in Paradime installed and granted necessary access to your repository.

  3. Github User-level OAuth configured in Paradime.

Setting up GitHub Native Continuous Deployment

  1. Create or Edit a Bolt Schedule: In the Bolt UI, create a new schedule or modify an existing one.

  2. Set Schedule Type to deferred: This allows your job to leverage results from previous runs, improving efficiency.

  3. Name your continuous deployment schedule: Choose a descriptive name for easy identification.

  4. Choose a Bolt Schedule to defer to: Select a previous job run to use as a reference, either from the same schedule or a different one.

  5. Set the comparison method: Determine how the current run compares with previous runs (e.g., Last Run, Last Successful Run).

  6. Enter dbt Commands: Specify the dbt tasks to execute as part of the continuous deployment. For example:

dbt run --select state:modified
  1. Specify the Git Branch: Choose which branch of your dbt project will be used when the continuous deployment is triggered (e.g., main).

  2. Set Trigger Type to On Merge: This automatically triggers the schedule when a pull request is merged into the specified Git branch.

  3. Publish Bolt Schedule: Save and activate your continuous deployment schedule.

Tutorial

Best Practices

  1. Selective Runs: Use state:modified+ in your dbt™ run command to only execute changed models and their dependencies.

  2. Deferred State: Configure the schedule to defer to its own last successful run for efficient incremental builds.

  3. Branch Selection: Typically set up for your main production branch, but can be configured for other branches if needed.

Viewing Output of CD Schedules

The Bolt UI provides an interface to view additional details about your continuous deployment schedule, including:

  • dbt™ Command Artifacts

  • .yml code behind Bolt UI Schedules

  • See logs of executed models

See Viewing Schedule Output for details.

YAML Configuration

You can also configure GitHub Native Continuous Deployment with Bolt via the paradime_schedules.yml file. Here's an example:

- name: CD Run (US)
  deferred_schedule:
    enabled: true
    deferred_schedule_name: CD Run (US)
    successful_run_only: false
  schedule: "OFF"
  environment: production
  trigger_on_merge: true
  git_branch: master
  commands:
    - dbt run -s state:modified+1,config.materialized:view --target cd_us
  slack_on:
    - passed
    - failed
  slack_notify:
    - "#dbt-deployment-alerts"

Last updated