code: public void collectVariables(EnvVars env, Run build, TaskListener listener) {
          EnvVars buildParameters = Utils.extractBuildParameters(build, listener);
          if (buildParameters != null) {
              env.putAll(buildParameters);
          }
          addAllWithFilter(envVars, env, filter.getPatternFilter());
          Map<String, String> sysEnv = new HashMap<>();
          Properties systemProperties = System.getProperties();
          Enumeration<?> enumeration = systemProperties.propertyNames();
          while (enumeration.hasMoreElements()) {
              String propertyKey = (String) enumeration.nextElement();
              sysEnv.put(propertyKey, systemProperties.getProperty(propertyKey));
          }
          addAllWithFilter(sysVars, sysEnv, filter.getPatternFilter());
      }
docs: Collect environment variables and system properties under with filter constrains