Atlas deployment
This page documents deployments using dpl v1 which currently is the default version. The next major version dpl v2 will be released soon, and we recommend starting to use it. Please see our blog post for details. dpl v2 documentation can be found here.
Travis CI can automatically deploy your application to Atlas after a successful build.
Hashicorp announced that Atlas is being decommissioned by March 30, 2017. It is replaced by Terraform Enterprise.
To deploy your application to Atlas:
- Sign in to your Atlas account.
- Generate an Atlas API token for Travis CI.
-
Add the following minimum configuration to your
.travis.yml
deploy: provider: atlas token: "YOUR ATLAS API TOKEN" app: "YOUR ATLAS USERNAME/YOUR ATLAS APP NAME"
Including or Excluding Files #
You can include and exclude files by adding the include
and exclude
entries to .travis.yml
. Both are glob patterns of files or directories to include or exclude, and may be specified multiple times. If there is a conflict, excludes have precedence over includes.
deploy:
provider: atlas
exclude: "*.log"
include:
- "build/*"
- "bin/*"
Using your Version Control System #
Get the lists of files to exclude and include from your version control system (Git, Mercurial or Subversion):
deploy:
provider: atlas
vcs: true
Other Deployment Options #
Specifying the Address of the Atlas Server: #
deploy:
provider: atlas
address: "URL OF THE ATLAS SERVER"
Adding Custom Metadata #
Add one or more items of metadata:
deploy:
provider: atlas
metadata:
- "custom_name=Jane"
- "custom_surname=Doe"
Conditional Deploys #
You can deploy only when certain conditions are met.
See Conditional Releases with on:
.
Running commands before and after deploy #
Sometimes you want to run commands before or after deploying. You can use the before_deploy
and after_deploy
stages for this. These will only be triggered if Travis CI is actually deploying.
before_deploy: "echo 'ready?'"
deploy:
..
after_deploy:
- ./after_deploy_1.sh
- ./after_deploy_2.sh