The Cookbook: Dpl

Header

Dpl is command line tool for deploying code, html, packages, or build artifacts to various service providers. It is tightly integrated into Travis CI’s deployment integration.

Requirements

Dpl requires Ruby 2.2 or above, and something to note is Dpl is generally optimized for usage on Linux systems.

Installation

This version of dpl is currently released as an alpha preview release. In order to install it, add the –pre flag:

gem install dpl --pre

Usage

Dpl is meant and optimized for usage in ephemeral build environments, such as Travis CI, but can be used on even more CI/CD providers.

Dpl is integrated to Travis CI’s build configuration and build script compilation tooling, so all you need to do is add the proper configuration to your .travis.yml file.

Cleaning up the Git working directory

In Dpl v1, it cleaned up the working git directory by using git stash --all. Dpl v2 does this by passing the option and cleaning up any left over artifacts from the build process by using the --cleanup argument.

The status of the working directory is relevant only to providers that package and push it to the respective remote service (e.g. heroku when using the api strategy, package registry providers, etc). Most providers will push the latest git commit, or pull from a remote repo.

Supported providers

For a list of supported providers please look at this documentation.

Integration

In your .travis.yml build a test one out, and allow the deployment to run on your branch:

deploy:
  - provider: [name]
    edge:
      source: [your-login]/dpl
      branch: [your-branch]
    on:
      branch: [your-branch]

There you have it, you now understand the basics of Dpl, if you have any questions, please don’t hesistate to use the community forums where I (Montana Mendy), or some other talented person will help you an issue, and get you moving further along in your building adventure.

Happy building!