All our repos and images are private, so I am just using placeholder names below as an example
Builds were failing due to an image we were using having an older version of node installed on it (8.3.1). So I created a new tag for that image with an updated version of node (12.3.1) but it seems as though Circle is still using the old image.
In the failed build “Spinning up environment” shows:
Starting container org/image:12.3.1
image cache not found on this host, downloading org/image:12.3.1
So it looks like the image is not caching.
Now the failing command is “lint”
#!/bin/bash -eo pipefail
npm run lint
> assistant@2.2.4 lint /assistant
> ng lint
You are running version v8.12.0 of Node.js, which is not supported by Angular CLI 8.0+.
The official Node.js version that is supported is 10.9 or greater.
As the error message above shows, we are using an old version of node.
I have rerun the build job with SSH, SSH’d onto that box and run the same command successfully.
ssh command provided by CircleCI
$ node --version
v12.3.1
$ npm run lint
successfully runs
Also to sanity check I have also created my own instance of that image and can do the same, using the following steps (the image is private so you won’t be able to do this).
$ docker pull org/image:12.3.1
$ docker run -d --name builder org/image:12.3.1 tail -f
$ docker exec -it builder /bin/bash
Then
$ node --version
v12.3.1
So despite pulling the brand new image when it spins up the environment, it still looks as though CircleCI is using an old image.
The config.yml
looks like this
version: 2.0
jobs:
test:
docker:
- image: org/image:12.3.1
auth:
username: correct_deets
password: $correct_deets
working_directory: /assistant
steps:
- checkout
- restore_cache:
keys:
- npm-cache-{{ checksum "package-lock.json" }}
- run: npm i
- save_cache:
key: npm-cache-{{ checksum "package-lock.json" }}
paths:
- node_modules
- run:
name: lint
command: npm run lint