Linking Travis CI as a source

Alpha release

This source is currently in alpha. The interface and available tables may change.

The Travis CI connector syncs your CI/CD data – repositories, builds, jobs, and branches – into the PostHog Data Warehouse, so you can analyze build durations, failure rates, and delivery metrics alongside your product data.

Prerequisites

You need a Travis CI (travis-ci.com) account with an API token. The token can read every repository its owning user has access to, and only those repositories are synced. Self-hosted Travis CI Enterprise instances are not supported.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Travis CI, you'll need:

  • API token – find or generate it in your Travis CI settings under API authentication, or run travis token --com with the Travis CI CLI.

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Builds and jobs sync incrementally: each sync pages newest-first and stops at the last synced ID. Builds or jobs that were still running when a sync last saw them keep the state from that sync – run a full refresh to re-pull final states. Repositories and branches are full refresh only.

Configuration

OptionTypeRequired
API tokenpasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
repositories

A repository on Travis CI, corresponding to a repository on GitHub or another source control provider.

Full refresh
builds

Synced newest-first; incremental syncs stop at the last-synced id, so rows that were still running when previously synced keep their state from that sync — run a full refresh to re-pull final states

Incremental, Full refreshid
jobs

Synced newest-first; incremental syncs stop at the last-synced id, so rows that were still running when previously synced keep their state from that sync — run a full refresh to re-pull final states

Incremental, Full refreshbuild_id
branches

Full refresh only, walking every accessible repository's branch list

Full refresh

Troubleshooting

  • If you get an "access denied" or authorization error, your Travis CI API token is invalid or has been revoked. Generate a new token in your Travis CI settings, then reconnect.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Community questions

Was this page useful?