Search all guides

Reference · Tools

Travis CI integration

Manage builds within the Travis CI continuous integration and continuous delivery platform, including getting, listing, canceling, restarting, and triggering them.

Action Development v1

The Travis CI node manages builds — getting, listing, cancelling, restarting and triggering them — through API v3. A typical build is kicking off a pipeline when a dependency updates, and restarting a build that failed for a transient reason.

Works as
Action
Tool name
travis_ci
Operations
5 — Cancel , Get , Get Many , Restart , Trigger
Parameters
13
Outputs
Output, Error
Credentials
Travis CI API
Official docs
Travis CI docs developer.travis-ci.com

What you can build with Travis CI

  • Get a specific build by ID.
  • List all builds for the current user.
  • List builds sorted by creation date.
  • Cancel a running build.
  • Restart a completed build.
  • Trigger a new build on a specific branch.
  • Trigger a build with a custom message and merge mode.

Overview

Travis CI is a continuous integration and continuous delivery (CI/CD) platform. This tool allows you to get build details, list builds, cancel running builds, restart completed builds, and trigger new builds on repository branches via the Travis CI API v3.

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Travis CI API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Buildbuild

Operations

OperationValueDescription
CancelcancelCancel a build
GetgetGet a build
Get ManygetAllGet many builds
RestartrestartRestart a build
TriggertriggerTrigger a build

Parameters

Build: Cancel

ParameterTypeRequiredDefaultDescription
Build IDstringYes—Value uniquely identifying the build.

Build: Get

ParameterTypeRequiredDefaultDescription
Build IDstringYes—Value uniquely identifying the build.
Additional FieldscollectionNo{}Optional extra options for this operation.
Options: asc, created_at, deep_merge
— IncludestringNo—List of attributes to eager load.

Build: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo100Max number of results to return. (shown when Return All is false)
Additional FieldscollectionNo{}Optional extra options for this operation.
Options: asc, created_at, deep_merge
— IncludestringNo—List of attributes to eager load.
— OrderoptionsNoascSort direction for results.
Options: asc, desc
— Sort ByoptionsNonumberField to sort results by.
Options: created_at, finished_at, id, number, started_at

Build: Restart

ParameterTypeRequiredDefaultDescription
Build IDstringYes—Value uniquely identifying the build.

Build: Trigger

ParameterTypeRequiredDefaultDescription
SlugstringYes—Repository slug in {owner}/{repo} format (e.g., octocat/hello-world).
BranchstringYes—Branch requested to be built.
Additional FieldscollectionNo{}Optional extra options for this operation.
Options: asc, created_at, deep_merge
— MessagestringNo—Travis CI status message attached to the request.
— Merge ModeoptionsNo—How to merge the build request configuration.
Options: deep_merge, deep_merge_append, deep_merge_prepend, merge, replace

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

How the result reaches the output item depends on the operation, and the two behaviors differ:

OperationOutput items per input item
get, cancel, restart, triggerOne item. The API response is merged onto the input item JSON, so fields already on the item pass through.
getAllFans out — one item per build. Each item’s JSON is the Travis build object and replaces the input item JSON entirely; upstream fields do not pass through.

Binary data is forwarded unchanged in every case. Because getAll replaces the item JSON, capture anything you need from upstream before this node, or read it back from the build object itself.

With Return All on, getAll pages through the whole build list; with it off, it requests a single page and trims it to Limit. Sort By and Order are combined into one sort instruction, so setting Order without Sort By has no effect.

Reference the result downstream by expression, e.g. {{ $json.id }} or {{ $json.state }}.

Example Configuration

Get one build, eager-loading its commit:

{
  "type": "travis_ci",
  "parameters": {
    "resource": "build",
    "operation": "get",
    "buildId": "{{ $json.buildId }}",
    "additionalFields": {
      "include": "build.commit"
    }
  }
}

List the 25 most recently finished builds:

{
  "type": "travis_ci",
  "parameters": {
    "resource": "build",
    "operation": "getAll",
    "returnAll": false,
    "limit": 25,
    "additionalFields": {
      "sortBy": "finished_at",
      "order": "desc"
    }
  }
}

Trigger a build on a branch with a custom message:

{
  "type": "travis_ci",
  "parameters": {
    "resource": "build",
    "operation": "trigger",
    "slug": "myorg/myrepo",
    "branch": "{{ $json.branch }}",
    "additionalFields": {
      "message": "Manual build from workflow",
      "mergeMode": "deep_merge"
    }
  }
}

Cancel a running build:

{
  "type": "travis_ci",
  "parameters": {
    "resource": "build",
    "operation": "cancel",
    "buildId": "{{ $json.buildId }}"
  }
}

Restart a finished build:

{
  "type": "travis_ci",
  "parameters": {
    "resource": "build",
    "operation": "restart",
    "buildId": "123456789"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool interacts with the Travis CI platform to manage continuous integration builds. It is ideal for getting details, listing, canceling, restarting, or triggering builds when direct interaction with the Travis CI service is needed. It produces information about builds, or initiates actions like canceling, restarting, or triggering new builds.

Frequently asked questions

Can it start a build?

Yes — trigger starts a new build, which is how you drive CI from an event that did not come from a commit.

What is restart useful for?

Re-running a build that failed for a transient reason without pushing a new commit, which is common with flaky infrastructure.

Can I check build status?

Yes, get and list retrieve builds so a workflow can wait on or report the outcome.

Which credential does it need?

A Travis CI API credential.

Build with Travis CI

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Travis CI API credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.