Class PipelineEnvContext

java.lang.Object
io.jenkins.plugins.context.PipelineEnvContext

public class PipelineEnvContext extends Object
Collects the environment variables defined while a pipeline runs, so that they are available when the notification content is rendered at the end of the build.

The variables are held on the build itself, in a PipelineEnvAction, so their lifetime matches the build's and concurrent builds cannot observe each other's values.

  • Constructor Details

    • PipelineEnvContext

      public PipelineEnvContext()
  • Method Details

    • merge

      public static void merge(Run<?,?> run, EnvVars value)
    • get

      public static EnvVars get(Run<?,?> run)
    • reset

      public static void reset(Run<?,?> run)
      Drops the cache once the notification has been sent. The build record is saved after onCompleted has run, so removing the action here also keeps it out of the saved build.