Multi-language project in CircleCI 2.0


#1

I’m considering switching over from 1.0 to 2.0 as I have a test failure that may be related to the Ubuntu version (1.0 is still on 14.05 LTS), but I need both ruby 2.4.1 and node version 8.2.1 or later in my project. Can this be done, and if so, how? I am having some difficulty with the migration guide at https://circleci.com/docs/2.0/migrating-from-1-2/.


#2

Yes it can. You just need to create an image that has both of those languages in it or use one of ours.

If you take a look at this doc, there’s two Docker tags you can use:

  • circlecie/ruby:2.4.1-node
  • circleci/ruby:2.4.1-node-browsers

Off the top of my head, I’m not sure which version of NodeJS it’s using but it should be fairly new. The images are available on our GitHub as well.

You can also create your own Docker image, which is more work, but the most efficient route to get to what you want.


#3

How do I create an image that has both?

I’m wholly new to Docker – how would I create such an image? I think I saw I need to have it hosted somewhere – is the image downloaded again for each test? Looking to have stable costs (I run a single-dev open source project)


#4

You might want to start with CircleCI’s if you can, but you can learn how to write Dockerfiles here.

The image would need to be hosted somewhere, such as Docker Hub which is free. Images may be downloaded each build but many times it’s cached.


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.