public static String resolveVar ( String var , Run run , TaskListener taskListener ) { String resolvedVar = var ; try { final EnvVars envVars = run . getEnvironment ( taskListener ) ; resolvedVar = envVars . expand ( var ) ; } catch ( IOException | InterruptedException e ) { LOG . warn ( "Can't resolve variable " + var + " for {}" , run , e ) ; } return resolvedVar ; }
Resolve on remoting side during execution . Because node may have some specific node vars .