Since Bluemix is based on Cloud Foundry this guide will also work for any other provider that uses Cloud Foundry like Pivotal WebServices, anynines and so on.
We’re going to install travis through gem install command.
You will also need to enter your Cloud Foundry username/password, organizations and space.
$ gem install travis $ git clone --depth=1 https://github.com/sudogem/microblog-express-node.git $ cd microblog-express-node.git $ travis setup cloudfoundry Detected repository as sudogem/microblog-express-node, is this correct? |yes| yes Cloud Foundry username: email@example.com Cloud Foundry password: ******** Cloud Foundry organization: myorgs Cloud Foundry space: myspace Deploy only from sudogem/microblog-express-node? |yes| yes Encrypt Password? |yes| yes ...
Next open your .travis.yml file and you will see the new settings been added:
$ vi .travis.yml deploy: provider: cloudfoundry api: https://api.ng.bluemix.net username: firstname.lastname@example.org password: secure: hLevKZevcv5RUXgj6oBKzY4goObujlNhO= organization: myorg space: myspace on: repo: sudogem/microblog-express-node ...
So every time you will push your commits the Travis CI will typically build the project so as to create the executable as well as other files necessary to run the application. After the build is completed, good practices include running all the tests to ensure they are all passing and everything is working as expected.
Once the automated test is complete it will execute the deployment on Bluemix.