code: @Override
      public void buildEnvironment(Run<?,?> build, EnvVars env) {
          Run run = getRun();
          
          String value = (null == run) ? "UNKNOWN" : Jenkins.getInstance().getRootUrl() + run.getUrl();
          env.put(name, value);
  
          env.put(name + ".jobName", getJobName());   // undocumented, left for backward compatibility
          env.put(name + "_JOBNAME", getJobName());   // prefer this version
  
          env.put(name + ".number" , getNumber ());   // same as above
          env.put(name + "_NUMBER" , getNumber ());
          
          // if run is null, default to the standard '#1' display name format
          env.put(name + "_NAME",  (null == run) ? "#" + getNumber() : run.getDisplayName());  // since 1.504
  
          String buildResult = (null == run || null == run.getResult()) ? "UNKNOWN" : run.getResult().toString();
          env.put(name + "_RESULT",  buildResult);  // since 1.517
  
          env.put(name.toUpperCase(Locale.ENGLISH),value); // backward compatibility pre 1.345
  
      }
docs: Exposes the name/value as an environment variable.