Engine Yard Deployment
This page documents deployments using the next major version dpl v2 which currently is in a beta release phase. Please see our blog post for details. The current default version is dpl v1. Check dpl v1 documentation here.
Travis CI can automatically deploy your Engine Yard application after a successful build.
For a minimal configuration, add the following to your
deploy: provider: engineyard api_key: <encrypted api_key> edge: true # opt in to dpl v2
Alternatively, you can use
deploy: provider: engineyard email: <email> password: <encrypted password>
The Engine Yard API token can be obtained here.
Support for deployments to Engineyard is in alpha. Please see Maturity Levels for details.
Known options #
Use the following options to further configure the deployment. Either
password are required.
||Engine Yard API key — secret, type: string, note: can be obtained at https://cloud.engineyard.com/cli|
|Engine Yard account email — type: string|
||Engine Yard password — secret, type: string|
||Engine Yard application name — type: string, default:
||Engine Yard application environment — type: string, alias:
||Engine Yard migration commands — type: string|
||Engine Yard account name — type: string|
Shared options #
||Clean up build artifacts from the Git working directory before the deployment — type: boolean|
||Commands to execute after the deployment finished successfully — type: string or array of strings|
Environment variables #
All options can be given as environment variables if prefixed with
api_key can be given as
Securing secrets #
Secret option values should be given as either encrypted strings in your build
.travis.yml file) or environment variables in your repository
Environment variables can be set on the settings page of your repository, or
travis env set:
travis env set ENGINEYARD_API_KEY <api_key>
In order to encrypt option values when adding them to your
travis encrypt <api_key>
--add to directly add it to your
.travis.yml file. Note that this command has to be run in your repository’s root directory:
travis encrypt --add deploy.api_key <api_key>
Application or Environment to deploy #
By default, the application name will be inferred from your repository name.
You can explicitly set the name via the app option:
deploy: provider: engineyard # ⋮ app: <app-name>
Deploying branches to different apps or environments #
In order to choose apps or environments based on the current branch use separate deploy configurations:
deploy: - provider: engineyard # ⋮ env: production on: branch: master - provider: engineyard # ⋮ env: staging on: branch: staging
Or using YAML references:
deploy: - &deploy provider: engineyard # ⋮ env: production on: branch: master - <<: *deploy env: staging on: branch: staging
Running migrations #
You can trigger migrations by using the migrate option:
deploy: provider: engineyard # ⋮ migrate: rake db:migrate
Pull Requests #
Note that pull request builds skip the deployment step altogether.