# How to achieve CICD with Habitat other than Chef Automate

**URL:** <https://discourse.chef.io/t/how-to-achieve-cicd-with-habitat-other-than-chef-automate/12185>\
**Category:** Chef Habitat\
**Created:** [July 28, 2016, 1:33pm UTC](https://discourse.chef.io/t/how-to-achieve-cicd-with-habitat-other-than-chef-automate/12185 "2016-07-28T13:33:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkgade](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rkgade](https://discourse.chef.io/u/rkgade)\
**Post date:** [July 28, 2016, 1:33pm UTC](https://discourse.chef.io/t/how-to-achieve-cicd-with-habitat-other-than-chef-automate/12185/1 "2016-07-28T13:33:35Z")

</div>

Hi Team,

I did look into the documents which refer to CI/CD using Habitat, but is tied up with Chef Automate.  
I wanted to understand can Habitat work in silos to create CI/CD pattern.  
For Example,  
Lets say I have a node js application.  
Code analysis scripts are in JSHint  
Unit test scripts are in Mocha  
and then finally the build step kicks in.

Is there a way I can mention somewhere like [plan.sh](http://plan.sh) at do\_build() as to continue with build only if unit tests are successful.  
Something like :  
do\_build()  
`
if ( all unit tests pass )
{
— build
}`

And as Habitat cannot by itself export into a docker container, should there be a command from either terminal or third party application like Chef Automate/Jenkins to trigger the deployment of docker images ?

---

<div class="post-metadata">

**Author:** ![bdangit](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bdangit/32/1466_2.png) [@bdangit](https://discourse.chef.io/u/bdangit)\
**Post date:** [August 20, 2016, 3:52am UTC](https://discourse.chef.io/t/how-to-achieve-cicd-with-habitat-other-than-chef-automate/12185/2 "2016-08-20T03:52:51Z")

</div>

You can execute commands within the hab studio from outside by doing this:

```auto
$ hab studio run build

```

This would allow you not to be in the studio to do said tasks like unit tests etc. alternatively you could install all the stuff you need in your container to test.

I also use the method above to pass in `hab pkg export docker <pkg>` Beware, if you don’t have a depot, you’ll have to build and package in the same run.
