balteo balteo - 1 year ago 111
Node.js Question

Multiple CircleCI machines/builds (nodejs + java/gradle)

I have a java application built with Gradle on CircleCI.

I need to be able to build and test a nodejs client module before it is packaged as a jar bundled with the main java app.

The client module is located within a sub-directory i.e.


Here are roughly the steps I currently have in my bash shell:

  • Changes directory into the sub-directory and downloads the npm dependencies:

cd ./myapp-client && npm install

  • Changes directory and test the module:

cd ./myapp-client && node_modules/.bin/ng test

  • Changes directory and builds the module:

cd ./myapp-client && node_modules/.bin/ng build -prod

Can you please provide guidelines as to how to achieve that with CircleCI?

Can I have a CircleCI machine/build based upon both java and nodejs?

Answer Source

All of those commands you've mentioned you can run from circle.yml:

A build on CircleCI happens within a container. Both Java, NodeJS, and other languages are already pre-installed for your use.

Depending on your needs, you can also build the client module as a separate project.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download