After updating the Jenkins, all builds started to fail with the following errors.
[ERROR] {some text}: {some text} is outdated. Please run next command `npm update`
[INFO] Treating warnings as errors because process.env.CI = true.
[INFO] Most CI servers set it automatically.
How can I fix this for all builds?
This is a result of this change:
https://issues.jenkins.io/browse/JENKINS-36707
It has introduced the standard CI env var that is always set to true in order to allow pipelines and tools to know they're executing in a continuous integration context.
This has emerged as a best practice used by most other popular CI solutions, and a number of tools look for this variable in order to make CI-appropriate optimizations.
You can set CI env variable to false through Manage Jenkins > Configure System > Global properties section.

Add a new env variable CI with the value false.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With