Continuous delivery is pretty awesome. There’s no fiddling about manually packaging or transferring code; instead, your code is automatically packaged and deployed on an ongoing basis, and you can see (and test) the results within a few minutes of making a change.
Up until recently, if you were using Bluemix, you needed to rely on external or third-party services coupled with various custom scripts to implement continuous delivery for your Bluemix applications. To make things easier, a Bluemix Continuous Delivery service was recently introduced, which comes tightly integrated with Bluemix out of the box and which provides a secure, automated way to build, test, and deploy your Bluemix applications.
I recently had an opportunity to try the new Bluemix Continuous Delivery service with a PHP application on GitHub. In my usage scenario, I wanted my target Bluemix deployment to always reflect the latest “tests passed” version of the PHP application’s dev-master branch.
The basic process I settled on was:
- Each time a pull request is created in the GitHub source repository, the source code will be automatically tested by Travis CI with PHPUnit to ensure all unit tests pass.
- If the unit tests pass, the pull request will be manually or automatically merged into the repository’s development branch. This merge will automatically trigger a new deployment of the application on Bluemix using a Bluemix Continuous Delivery toolchain.
- If the unit tests fail, the pull request will not be merged and the current deployment on Bluemix will remain unaffected.
Here’s what the process looks like:
Sounds interesting? To find out how to do the same for your Bluemix applications, read my IBM developerWorks article which has a complete walkthrough of the steps.