Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins build fails with "Treating warnings as errors because of process.env.CI = true"

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?

like image 975
Yasas Gunarathne Avatar asked Dec 06 '25 10:12

Yasas Gunarathne


1 Answers

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. enter image description here

Add a new env variable CI with the value false. enter image description here

like image 64
Yasas Gunarathne Avatar answered Dec 08 '25 02:12

Yasas Gunarathne



Donate For Us

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