Class DockerTemplateBase
- java.lang.Object
-
- com.nirima.jenkins.plugins.docker.DockerTemplateBase
-
- All Implemented Interfaces:
Describable<DockerTemplateBase>
,Serializable
- Direct Known Subclasses:
DockerSimpleTemplate
public class DockerTemplateBase extends Object implements Describable<DockerTemplateBase>, Serializable
Base for docker templates - does not include Jenkins items like labels.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DockerTemplateBase.DescriptorImpl
-
Field Summary
Fields Modifier and Type Field Description boolean
bindAllPorts
String
bindPorts
String
cgroupParent
Long
cpuPeriod
Long
cpuQuota
String
cpus
Integer
cpuShares
String[]
devices
Every String is a device to be mappedString[]
dnsHosts
String[]
dnsSearch
String[]
environment
String
hostname
Integer
memoryLimit
Integer
memorySwap
String[]
mounts
Every String is mount specificationString
network
boolean
privileged
Integer
shmSize
boolean
tty
String[]
volumes
Deprecated.usemounts
String
volumesFrom
Deprecated.usevolumesFrom2
String[]
volumesFrom2
Every String is volumeFrom specification
-
Constructor Summary
Constructors Constructor Description DockerTemplateBase(String image)
DockerTemplateBase(String image, String pullCredentialsId, String dnsString, String dnsSearchString, String network, String dockerCommand, String mountsString, String volumesFromString, String environmentsString, String hostname, String user, String extraGroupsString, Integer memoryLimit, Integer memorySwap, Long cpuPeriod, Long cpuQuota, Integer cpuShares, Integer shmSize, String bindPorts, boolean bindAllPorts, boolean privileged, boolean tty, String macAddress, String extraHostsString)
Deprecated.CallDockerTemplateBase(String)
then use DataBoundSetters
-
Method Summary
-
-
-
Field Detail
-
hostname
@CheckForNull public String hostname
-
dnsHosts
@CheckForNull public String[] dnsHosts
-
dnsSearch
@CheckForNull public String[] dnsSearch
-
network
@CheckForNull public String network
-
volumes
@Deprecated @CheckForNull public String[] volumes
Deprecated.usemounts
-
mounts
@CheckForNull public String[] mounts
Every String is mount specification
-
volumesFrom
@Deprecated @CheckForNull public String volumesFrom
Deprecated.usevolumesFrom2
-
volumesFrom2
@CheckForNull public String[] volumesFrom2
Every String is volumeFrom specification
-
devices
@CheckForNull public String[] devices
Every String is a device to be mapped
-
environment
@CheckForNull public String[] environment
-
bindPorts
@CheckForNull public String bindPorts
-
bindAllPorts
public boolean bindAllPorts
-
memoryLimit
@CheckForNull public Integer memoryLimit
-
memorySwap
@CheckForNull public Integer memorySwap
-
cgroupParent
@CheckForNull public String cgroupParent
-
cpus
@CheckForNull public String cpus
-
cpuPeriod
@CheckForNull public Long cpuPeriod
-
cpuQuota
@CheckForNull public Long cpuQuota
-
cpuShares
@CheckForNull public Integer cpuShares
-
shmSize
@CheckForNull public Integer shmSize
-
privileged
public boolean privileged
-
tty
public boolean tty
-
-
Constructor Detail
-
DockerTemplateBase
@DataBoundConstructor public DockerTemplateBase(String image)
-
DockerTemplateBase
@Deprecated public DockerTemplateBase(String image, String pullCredentialsId, String dnsString, String dnsSearchString, String network, String dockerCommand, String mountsString, String volumesFromString, String environmentsString, String hostname, String user, String extraGroupsString, Integer memoryLimit, Integer memorySwap, Long cpuPeriod, Long cpuQuota, Integer cpuShares, Integer shmSize, String bindPorts, boolean bindAllPorts, boolean privileged, boolean tty, String macAddress, String extraHostsString)
Deprecated.CallDockerTemplateBase(String)
then use DataBoundSetters- Parameters:
image
- SeeDockerTemplateBase(String)
pullCredentialsId
- SeesetPullCredentialsId(String)
dnsString
- SeesetDnsString(String)
dnsSearchString
- SeesetDnsSearchString(String)
network
- SeesetNetwork(String)
dockerCommand
- SeesetDockerCommand(String)
mountsString
- SeesetMountsString(String)
volumesFromString
- SeesetVolumesFromString(String)
environmentsString
- SeesetEnvironmentsString(String)
hostname
- SeesetHostname(String)
user
- SeesetUser(String)
extraGroupsString
- SeesetExtraGroupsString(String)
memoryLimit
- SeesetMemoryLimit(Integer)
memorySwap
- SeesetMemorySwap(Integer)
cpuPeriod
- SeesetCpuPeriod(Long)
cpuQuota
- SeesetCpuQuota(Long)
cpuShares
- SeesetCpuShares(Integer)
shmSize
- SeesetShmSize(Integer)
bindPorts
- SeesetBindPorts(String)
bindAllPorts
- SeesetBindAllPorts(boolean)
privileged
- SeesetPrivileged(boolean)
tty
- SeesetTty(boolean)
macAddress
- SeesetMacAddress(String)
extraHostsString
- SeesetExtraHostsString(String)
-
-
Method Detail
-
readResolve
protected Object readResolve()
-
getImage
@NonNull public String getImage()
-
getPullCredentialsId
@CheckForNull public String getPullCredentialsId()
-
setPullCredentialsId
@DataBoundSetter public void setPullCredentialsId(String pullCredentialsId)
-
getDockerCommand
@CheckForNull public String getDockerCommand()
-
setDockerCommand
@DataBoundSetter public void setDockerCommand(String dockerCommand)
-
getHostname
@CheckForNull public String getHostname()
-
setHostname
@DataBoundSetter public void setHostname(String hostname)
-
getUser
@CheckForNull public String getUser()
-
setUser
@DataBoundSetter public void setUser(String user)
-
setExtraGroupsString
@DataBoundSetter public void setExtraGroupsString(String extraGroupsString)
-
getExtraGroupsString
@NonNull public String getExtraGroupsString()
-
getDnsHosts
@CheckForNull public String[] getDnsHosts()
-
getDnsString
@NonNull public String getDnsString()
-
setDnsHosts
public void setDnsHosts(String[] dnsHosts)
-
setDnsString
@DataBoundSetter public void setDnsString(String dnsString)
-
getDnsSearch
@CheckForNull public String[] getDnsSearch()
-
getDnsSearchString
@NonNull public String getDnsSearchString()
-
setDnsSearch
public void setDnsSearch(String[] dnsSearch)
-
setDnsSearchString
@DataBoundSetter public void setDnsSearchString(String dnsSearchString)
-
getNetwork
@CheckForNull public String getNetwork()
-
setNetwork
@DataBoundSetter public void setNetwork(String network)
-
getMounts
@CheckForNull public String[] getMounts()
-
setMounts
public void setMounts(String[] mounts)
-
getMountsString
@NonNull public String getMountsString()
-
setMountsString
@DataBoundSetter public void setMountsString(String mountsString)
-
getVolumesFromString
@NonNull public String getVolumesFromString()
-
setVolumesFromString
@DataBoundSetter public void setVolumesFromString(String volumesFromString)
-
getDevices
@CheckForNull public String[] getDevices()
-
getDevicesString
@NonNull public String getDevicesString()
-
setDevices
public void setDevices(String[] devices)
-
setDevicesString
@DataBoundSetter public void setDevicesString(String devicesString)
-
getEnvironment
@CheckForNull public String[] getEnvironment()
-
getEnvironmentsString
@NonNull public String getEnvironmentsString()
-
setEnvironment
public void setEnvironment(String[] environment)
-
setEnvironmentsString
@DataBoundSetter public void setEnvironmentsString(String environmentsString)
-
getBindPorts
@CheckForNull public String getBindPorts()
-
setBindPorts
@DataBoundSetter public void setBindPorts(String bindPorts)
-
isBindAllPorts
public boolean isBindAllPorts()
-
setBindAllPorts
@DataBoundSetter public void setBindAllPorts(boolean bindAllPorts)
-
getMemoryLimit
@CheckForNull public Integer getMemoryLimit()
-
setMemoryLimit
@DataBoundSetter public void setMemoryLimit(Integer memoryLimit)
-
getMemorySwap
@CheckForNull public Integer getMemorySwap()
-
setMemorySwap
@DataBoundSetter public void setMemorySwap(Integer memorySwap)
-
getCgroupParent
@CheckForNull public String getCgroupParent()
-
setCgroupParent
@DataBoundSetter public void setCgroupParent(String cgroupParent)
-
getCpus
@CheckForNull public String getCpus()
-
setCpus
@DataBoundSetter public void setCpus(String cpus)
-
getCpuPeriod
@CheckForNull public Long getCpuPeriod()
-
setCpuPeriod
@DataBoundSetter public void setCpuPeriod(Long cpuPeriod)
-
getCpuQuota
@CheckForNull public Long getCpuQuota()
-
setCpuQuota
@DataBoundSetter public void setCpuQuota(Long cpuQuota)
-
getCpuShares
@CheckForNull public Integer getCpuShares()
-
setCpuShares
@DataBoundSetter public void setCpuShares(Integer cpuShares)
-
getShmSize
@CheckForNull public Integer getShmSize()
-
setShmSize
@DataBoundSetter public void setShmSize(Integer shmSize)
-
isPrivileged
public boolean isPrivileged()
-
setPrivileged
@DataBoundSetter public void setPrivileged(boolean privileged)
-
isTty
public boolean isTty()
-
setTty
@DataBoundSetter public void setTty(boolean tty)
-
getMacAddress
@CheckForNull public String getMacAddress()
-
setMacAddress
@DataBoundSetter public void setMacAddress(String macAddress)
-
getExtraHostsString
@NonNull public String getExtraHostsString()
-
setExtraHostsString
@DataBoundSetter public void setExtraHostsString(String extraHostsString)
-
getSecurityOptsString
@NonNull public String getSecurityOptsString()
-
setSecurityOptsString
@DataBoundSetter public void setSecurityOptsString(String securityOpts)
-
getCapabilitiesToAddString
@NonNull public String getCapabilitiesToAddString()
-
setCapabilitiesToAddString
@DataBoundSetter public void setCapabilitiesToAddString(String capabilitiesToAddString)
-
getCapabilitiesToDropString
@NonNull public String getCapabilitiesToDropString()
-
setCapabilitiesToDropString
@DataBoundSetter public void setCapabilitiesToDropString(String capabilitiesToDropString)
-
getExtraDockerLabelsString
@NonNull public String getExtraDockerLabelsString()
-
setExtraDockerLabelsString
@DataBoundSetter public void setExtraDockerLabelsString(String extraDockerLabelsString)
-
getRegistry
public org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint getRegistry()
-
getVolumesFrom
@Deprecated public String getVolumesFrom()
Deprecated.- Returns:
- unused field
-
getVolumesFrom2
@CheckForNull public String[] getVolumesFrom2()
-
setVolumesFrom2
public void setVolumesFrom2(String[] volumesFrom)
-
setVolumes
@Deprecated public void setVolumes(String[] vols)
Deprecated.For ConfigurationAsCode compatibility
-
getVolumes
@Deprecated @CheckForNull public String[] getVolumes()
Deprecated.usegetMounts()
For ConfigurationAsCode compatibility
-
setVolumesString
@Deprecated public void setVolumesString(String volumesString)
Deprecated.For ConfigurationAsCode compatibility
-
getVolumesString
@Deprecated @NonNull public String getVolumesString()
Deprecated.For ConfigurationAsCode compatibility
-
getDisplayName
public String getDisplayName()
-
getDockerCommandArray
@CheckForNull public String[] getDockerCommandArray()
-
getPortMappings
@NonNull public Iterable<com.github.dockerjava.api.model.PortBinding> getPortMappings()
-
fillContainerConfig
public com.github.dockerjava.api.command.CreateContainerCmd fillContainerConfig(com.github.dockerjava.api.command.CreateContainerCmd containerConfig)
-
getDescriptor
public Descriptor<DockerTemplateBase> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<DockerTemplateBase>
-
getFullImageId
public String getFullImageId()
-
-