Console Mode Execution

I was trying also this approach to call it from pipeline:

withEnv(['HTTP_PROXY=http://proxyAddress:port']) {
sh "npm run test"
}

Seems to be it is not able to get proxy settings, it works only if you set proxy in katalon UI, but this is not suitable for pipeline jenkins, cause it does not catch this settings. It works only if you are logged into terminal and run it.