Yarn version 0.27

In a tweet, it was mentioned that Yarn would be updated on your build images sometime in the near future.

I wanted to create this topic to:
a) check which images this would apply to, and
b) get a notification when this was completed

1 Like

Yarn has been updated to v0.27.5. You can see this announcement here.

You can subscribe to notifications for announcements like this via the Announcements Category on CircleCI Discuss.

How we’re going about CircleCI 1.0 image updates:

There are currently two build images for CircleCI 1.0. The Ubuntu 14.04 image and the Ubuntu 12.04 image. The 12.04 image has been End of Life’d (EOL) by Canonical and thus, we have EOL’d it too. We will not be updating that image. The Ubuntu 14.04 image will be updated for awhile though there isn’t set dates. Typically in the past, this has been updated once a quarter. We suggest for more frequent updates and full control of your build, to use CircleCI 2.0.

TL:DR;

Ubuntu 12.04 - will not ever be updated
Ubuntu 14.04 - software updated for major versions and security/bug fixes approximately once a quarter
CircleCI 2.0 - Use this for more control on when and what is updated

1 Like

How do you guys recommend you update the version in CircleCI 2.0?

Using circleci/node:8 I’m doing this:

- run: sudo apt-get install apt-transport-https
- run: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- run: sudo apt-get update && sudo apt-get install yarn

It works but is it the right way to do it?

Thanks Feliciano!
However, SSHing into the machine, I get this:

Looking at the steps we have to save & restore caching seems to be working, but that wrong version concerns me. Am I doing something wrong or missing something?

@ekryski So… I’m not sure if there’s a recommended way at this point. CircleCI’s convenience images (which circleci/node:8 is one of them are based on the upstream, official Node images provided by Docker. They pre-install Yarn in their image like this:

ENV YARN_VERSION 0.27.5

RUN set -ex \
  && for key in \
    6A010C5166006599AA17F08146C2130DFD2497F5 \
  ; do \
    gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
    gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
  done \
  && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
  && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
  && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
  && mkdir -p /opt/yarn \
  && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
  && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
  && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
  && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz

You can do the same thing, just replace the binary at the end, or just keep doing what you already are.

Keep in mind though that they are using the latest stable version of Yarn and they usually will be.

@gnclmorais Which version of CircleCI are you using and which build image?

This seems to have been fixed now, thanks! :smiley:

1 Like