Continuous integration and build for ionic application development


I’m new to ionic based application development. To start with I’m using Yeoman generator for ionic. With yeoman I’m quickly able to start my development. Now I would like to know how to automate the process with respect to continuous integration.
If I run yo or cordova , in a folder where the source is checked out, then the commands complain that folder is not empty.
By default yo creates “app” folder with in which I can write all html, javascript and SCSS files. During grunt serve, the SCSS from app folder is compiles and minified, the js files can also be minified. And then they are put in www folder.
I plan to use jenkins to automate the source checkout, adding plugins and platforms and build, test and release. I would like to know how to go about automating my build pipeline.

thanks in advance

Yeoman is only a generator, you don’t use it for your build.
I use another generator that uses gulp rather than grunt so you may have to adapt and check their doc.

For jenkins, you need to install nodejs, don’t use the nodejs plugin, it’s not really maintained anymore, you’d better install node using nvm, this way you install node only for jenkins user.
Then you must install the SDK

You got to create a shell script for jenkins which basically will do what you did manually.
You may want to have 2 scripts, one for initial setup and for recurring builds:

nvm use 0.12.4
npm install -g cordova ionic bower grunt-cli

cd workspace
npm install
bower install
grunt platform:add:android
grunt build:android


I am interested in using ionic and jenkins and testfairy, have you done that?, do you have a example of a script you use with ionic, I think the example is the initial build?