We have now made a new version of this image, tagged “latest”, but we don’t know how to make the pipeline pull this new version.
The output in our pipeline is:
Container image “/public-build-containers/okteto-pipeline-runner:latest” already present on machine
It makes sense that it reuses the cached image by default, to save time. But how can we make it pull the image, or is it possible to remove the cached image manually some way?
Okteto uses the pullPolicy defined in your helm installation. This is the default:
pullPolicy: IfNotPresent
You could change that to Always and it will fix it but it would have some performance implications since it will all pull images every time and no longer use the cache (not only for the installer).
Another option is to use a different images tag to take full advantage of the cache, for eg: okteto-pipeline-runner:${GIT_SHA} and change the tag every time there’s a change in the image. This is the recommended approach.
The “Always” solution indeed sounds less favorable.
We’ve used the approach of changing the image tag, this works. It does require upgrading the okteto Helm manifest, but these changes are rare anyway so this will work for us.