Travis CI

Out of the box support

The TravisCI alias, which returns an ITravisCIProvider instance can be used to interact with the Travis CI environment.

The following example prints the build number if running on Travis CI:

if (BuildSystem.TravisCI.IsRunningOnTravisCI)
{
    Information(BuildSystem.TravisCI.Environment.Build.BuildId);
}
else
{
    Information("Not running on Travis CI");
}

See ITravisCIProvider for details and available methods to interact with Travis CI.

Running Cake

The recommended way to run the Cake .NET Tool on Travis CI is by using a tool manifest:

script:
  - dotnet tool restore
  - dotnet cake

If you are using Cake.Sdk with a file-based script:

script:
  - dotnet cake.cs

If you are using Cake.Sdk with a project:

script:
  - dotnet run --project cake.csproj

If you are using Cake Frosting:

script:
  - dotnet run --project cake.csproj

Available 3rd party extensions

Cake.TravisCI by Rodney Littles II
Cake addin that extends the DSL with TravisCI aliases.