Class ImageReference
java.lang.Object
io.jenkins.plugins.kubernetes.ephemeral.ImageReference
Container image reference. Image references parsed by this class are always normalized:
- If no domain component, "
docker.io
" will be added - If domain is "
docker.io
" and no repo component "library/
" will be added - If no tag or digest component, "
latest
" tag will be added
maven -> docker.io/library/maven:latest docker.io/maven -> docker.io/library/maven:latest
-
Method Summary
Modifier and TypeMethodDescriptionImage digest.Image registry domain.getName()
Image name (domain and path).getPath()
Image path component.Get full image reference string (domain + path + tag/digest).getTag()
Image tag name.static Optional<ImageReference>
Parse an image reference string.toString()
-
Method Details
-
parse
Parse an image reference string. The parse reference will be normalized, meaning if no registry/domain component is specified, it will be assumed to be "docker.io
".This parse image references that are not technically valid. The may purpose is to break it into component pieces so rules can be applied against them. We are not concerned about strict limits as that will ultimately be the responsibility of the cluster.
- Parameters:
reference
- reference string, not null- Returns:
- image reference or empty if invalid refence format
-
getDomain
Image registry domain.- Returns:
- registry domain, not
null
-
getPath
Image path component. Does not include the domain component.- Returns:
- path, not
null
-
getName
Image name (domain and path). Does not include tag or digest.- Returns:
- name, not
null
-
getTag
Image tag name.- Returns:
- tag name or
null
-
getDigest
Image digest.- Returns:
- image digest or
null
-
getReference
Get full image reference string (domain + path + tag/digest).- Returns:
- full image reference string
-
toString
-