SitePoint
  • Premium
  • Library
  • Community
  • Save on SaaS
  • Jobs
  • Blog
LoginStart Free Trial
Preface
1

A Beginner’s Guide to Deployment with Continuous Integration

More Configuration Features

We’ve covered only the basic features of the Travis CI configuration. There are further options of configuring the build, which are listed below.

  • You can set the quiet option of git to true in order to ignore cloning logs to keep your log file concise:

    Code snippet

    git:  quiet: true
  • Safelist and blocklist specific branches for builds using the only and except options:

    Code snippet

    # blocklist  branches:    except:    - test_branch
      # safelist  branches:    only:    - master
  • You can run any custom commands before installing dependencies using the before_install option:

    Code snippet

    before_install:  - sudo apt-get update

Here’s the full list of customization features as listed on the Travis CI documentation.

Advanced Features of Travis CI

Now that you’ve run a basic process on Travis CI, let’s discuss a few advanced features of Travis CI. In this section, we’ll cover the integration of Travis CI with Docker, how to set up cron jobs in Travis, and advanced security features in Travis through Travis CI.

Integration with Docker

Docker is a popular software delivery service that helps you create standardized development environments. Travis integrates with Docker to set up containers in the build process.

First, you need to enable the service on Travis through the .yml configuration file. You can then pull a Docker image before running your tests. This can be done by running a docker command under the before_install section of the configuration file.

End of PreviewSign Up to unlock the rest of this title.
On this page

Community Questions

Previous
Finish