You now have the amazing ability to deploy directly to CloudFoundry after a successful build on Travis CI.
Getting on the Edge
Proper CloudFoundry support is currently included only in the edge version of Travis. See how to enable it via the
The Easy Way
Go grab the Travis gem from GitHub and run this command:
travis setup cloudfoundry
You will be asked to answer a few simple questions about your CloudFoundry setup, and Travis will take care of the rest!
Open up your newly-created
.travis.yml and add
edge: true to enable the deploy tool. See yml below for an example of how to do this.
The Slightly Harder Way
So you want to write your own
.travis.yml, fine. Here is the minimum required to get up and running:
deploy: edge: true provider: cloudfoundry username: email@example.com password: supersecretpassword api: https://api.run.pivotal.io organization: myawesomeorganization space: staging
Make sure that you encrypt your password before pushing your updated .travis.yml to GitHub.
You can do this using the Travis gem above and running:
travis encrypt --add deploy.password
If your password includes symbols (such as braces, parentheses, backslashes, and pipe symbols), you must escape those symbols before running
You can deploy only when certain conditions are met.
See Conditional Releases with