code: public void buildEnvironment(@Nonnull Run<?,?> build, @Nonnull Map<String,String> env) {
          if (build instanceof AbstractBuild) {
              buildEnvVars((AbstractBuild)build, env);
          }
      }
docs: Adds environmental variables for the builds to the given map.
  
  <p>
  This can be used to propagate information from SCM to builds
  (for example, SVN revision number.)
  
  <p>
  This method is invoked whenever someone does {@link AbstractBuild#getEnvironment(TaskListener)}, via
  {@link #buildEnvVars(AbstractBuild, Map)}, which can be before/after your checkout method is invoked. So if you
  are going to provide information about check out (like SVN revision number that was checked out), be prepared
  for the possibility that the check out hasn't happened yet.
  
  @since 2.60