Class EnvInjectAction

java.lang.Object
org.jenkinsci.lib.envinject.EnvInjectAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject, jenkins.model.RunAction2, org.kohsuke.stapler.StaplerProxy

public class EnvInjectAction extends Object implements jenkins.model.RunAction2, org.kohsuke.stapler.StaplerProxy
Author:
Gregory Boissinot
  • Field Details

    • URL_NAME

      public static final String URL_NAME
      See Also:
    • envMap

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull protected transient Map<String,String> envMap
      Local cache of environment variables. This cache may be null if the loading has never been performed. Use getEnvMap() in external API
  • Constructor Details

    • EnvInjectAction

      @Deprecated public EnvInjectAction(@NonNull hudson.model.AbstractBuild build, @CheckForNull Map<String,String> envMap)
      Deprecated.
      The action implements RunAction2 now, hence passing build is not required anymore. Use EnvInjectAction(java.util.Map).
      Constructs action for the specified environment variables.
      Parameters:
      build - Build
      envMap - Environment Map
    • EnvInjectAction

      public EnvInjectAction(@CheckForNull Map<String,String> envMap)
      Constructs action for the specified environment variables.
      Parameters:
      envMap - Environment Map
      Since:
      0.25
  • Method Details

    • onAttached

      public void onAttached(hudson.model.Run<?,?> run)
      Specified by:
      onAttached in interface jenkins.model.RunAction2
    • onLoad

      public void onLoad(hudson.model.Run<?,?> run)
      Specified by:
      onLoad in interface jenkins.model.RunAction2
    • overrideAll

      public void overrideAll(Map<String,String> all)
    • overrideAll

      public void overrideAll(@CheckForNull Set<String> sensibleVariables, @CheckForNull Map<String,String> all)
    • getEnvMap

      @CheckForNull public Map<String,String> getEnvMap()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface hudson.model.Action
    • getDisplayName

      @NonNull public String getDisplayName()
      Specified by:
      getDisplayName in interface hudson.model.Action
      Specified by:
      getDisplayName in interface hudson.model.ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface hudson.model.Action
    • writeReplace

      protected Object writeReplace() throws ObjectStreamException
      Throws:
      ObjectStreamException
    • getOwner

      @CheckForNull public hudson.model.Run<?,?> getOwner()
      Retrieves an owner Run of this action.
      Returns:
      Run, which contains the action. May be null if and only if the action is not attached to the run.
      Since:
      TODO
    • getTarget

      public Object getTarget()
      Specified by:
      getTarget in interface org.kohsuke.stapler.StaplerProxy
    • getSensibleVariables

      @CheckForNull public Set<String> getSensibleVariables()