Travis CI can automatically deploy your application to Atlas after a successful build.
To deploy your application to Atlas:
- Sign in to your Atlas account.
- Generate an Atlas API token for for Travis CI.
Add the following minimum configuration to your
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
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"
You can deploy only when certain conditions are met.
See Conditional Releases with
Running commands before and after deploy
Sometimes you want to run commands before or after deploying. You can use the
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