I’m currently investigating what can be done with CircleCI 2.1. I would like to use a .ruby-version
file to tell circleci which docker image to use in a executor. Here’s an excerpt of the my ideal circle.yml
file:
executors:
ruby:
docker:
- image: circleci/ruby:{{ cat .ruby-version }}
Where the contents of .ruby-version
are interpolated into the image name, and would effectively result in something like:
image: circleci/ruby:2.4.1
As far as I can tell, there’s no way to do with this right now. Does anyone know of a way I can achieve this type of thing (use the contents of a file to make up a portion of the name of the specified docker image)?