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
Base class for ORAS parameter definition
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.ParameterDefinition
ParameterDefinition.ParameterDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.model.ParameterDefinition
LIST -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOrasParameterDefinition(@NonNull String name, String description, String containerRef) -
Method Summary
Modifier and TypeMethodDescriptionprotected Job<?, ?> Find the job owning this parameter definition.getAnnotationsFromDigest(land.oras.ContainerRef effectiveRef, String digest) getAnnotationsFromTag(land.oras.ContainerRef effectiveRef, String tag) protected StringGet a digest from a ref and cache it if neededabstract Stringprotected land.oras.ContainerRefbooleanprotected com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentialsResolve the credentials of this parameter in the context of the job owning itprotected static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentialsresolveCredentials(Item item, String credentialsId) Resolve credentials in the context of the given item.voidsetCredentialsId(String credentialsId) voidsetInsecure(boolean insecure) Methods inherited from class hudson.model.ParameterDefinition
all, copyWithDefaultValue, createValue, createValue, createValue, createValue, createValue, equals, getDefaultParameterValue, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
-
Field Details
-
containerRef
-
credentialsId
-
insecure
protected boolean insecure
-
-
Constructor Details
-
AbstractOrasParameterDefinition
-
-
Method Details
-
getCredentialsId
-
getEffectiveDefaultTag
-
setCredentialsId
-
getContainerRef
-
isInsecure
public boolean isInsecure() -
setInsecure
@DataBoundSetter public void setInsecure(boolean insecure) -
getEffectiveReference
protected land.oras.ContainerRef getEffectiveReference() -
getDigest
Get a digest from a ref and cache it if needed- Parameters:
effectiveRef- The reftag- The tag to resolve- Returns:
- The digest
-
getAnnotationsFromTag
-
getAnnotationsFromDigest
-
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 credentialscredentialsId- The credentials ID- Returns:
- The credentials or null if not set, not found or not available to the item
-
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
-