Class AbstractOrasParameterDefinition

java.lang.Object
hudson.model.ParameterDefinition
io.jenkins.plugins.oras.parameter.AbstractOrasParameterDefinition
All Implemented Interfaces:
ExtensionPoint, Describable<ParameterDefinition>, Serializable
Direct Known Subclasses:
OrasPlatformParameterDefinition, OrasRepositoryParameterDefinition, OrasTagParameterDefinition

public abstract class AbstractOrasParameterDefinition extends ParameterDefinition
Base class for ORAS parameter definition
See Also:
  • Field Details

    • containerRef

      protected final String containerRef
    • credentialsId

      protected String credentialsId
    • insecure

      protected boolean insecure
  • Constructor Details

    • AbstractOrasParameterDefinition

      protected AbstractOrasParameterDefinition(@NonNull String name, String description, String containerRef)
  • Method Details

    • getCredentialsId

      public String getCredentialsId()
    • getEffectiveDefaultTag

      public abstract String getEffectiveDefaultTag()
    • setCredentialsId

      @DataBoundSetter public void setCredentialsId(String credentialsId)
    • getContainerRef

      public String getContainerRef()
    • isInsecure

      public boolean isInsecure()
    • setInsecure

      @DataBoundSetter public void setInsecure(boolean insecure)
    • getEffectiveReference

      protected land.oras.ContainerRef getEffectiveReference()
    • getDigest

      @Nullable protected String getDigest(land.oras.ContainerRef effectiveRef, String tag)
      Get a digest from a ref and cache it if needed
      Parameters:
      effectiveRef - The ref
      tag - The tag to resolve
      Returns:
      The digest
    • getAnnotationsFromTag

      protected Map<String,String> getAnnotationsFromTag(land.oras.ContainerRef effectiveRef, String tag)
    • getAnnotationsFromDigest

      protected Map<String,String> getAnnotationsFromDigest(land.oras.ContainerRef effectiveRef, String digest)
    • resolveCredentials

      @Nullable protected com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials resolveCredentials()
      Resolve the credentials of this parameter in the context of the job owning it
      Returns:
      The credentials or null if not set, not found or not available to the owning job
    • resolveCredentials

      @Nullable protected static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials resolveCredentials(@Nullable Item item, @Nullable String credentialsId)
      Resolve credentials in the context of the given item. Never resolve against the Jenkins root context to avoid exposing SYSTEM scoped credentials
      Parameters:
      item - The item in which context to resolve credentials
      credentialsId - The credentials ID
      Returns:
      The credentials or null if not set, not found or not available to the item
    • findOwner

      @Nullable protected Job<?,?> findOwner()
      Find the job owning this parameter definition. Use the current request ancestor if available, otherwise search all jobs.
      Returns:
      The owning job or null if not found