@Extension @ExportedBean public class DockerEventsAction extends Object implements hudson.model.RootAction, hudson.search.SearchableModelObject, hudson.model.Saveable
| Constructor and Description |
|---|
DockerEventsAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerID(String containerID)
Adds new container ID to the registry.
|
void |
doContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Gets a container
Fingerprint page. |
void |
doImage(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Gets an image
Fingerprint page. |
org.kohsuke.stapler.HttpResponse |
doQueryContainer(String id,
String mode,
long since,
long until)
Queries container statuses via API.
|
void |
doRawContainerInfo(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String containerId)
Retrieves the latest container status via API.
|
void |
doRawImageInfo(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Retrieves the latest raw status via API.
|
void |
doRemoveContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String id)
Removes the container reference from the registry.
|
void |
doSubmitContainerStatus(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String inspectData,
String hostId,
String hostName,
String status,
long time,
String environment,
String imageName)
Submits a new event through Jenkins API.
|
void |
doSubmitEvent(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String json)
Submits a new
DockerTraceabilityReport via API. |
void |
doTestSubmitBuildRef(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String imageId,
String jobName)
Deprecated.
Test only
|
List<DockerRecordsRegistry> |
getAllEvents()
Retrieves all registered
DockerDeploymentFacets. |
hudson.model.Api |
getApi() |
protected hudson.XmlFile |
getConfigFile() |
Set<String> |
getContainerIDs()
Get a list of all Docker container IDs.
|
List<DockerContainerRecord> |
getContainerRecords()
Gets a last container record for every registered container.
|
DockerDeploymentFacet |
getDeploymentFacet(String containerId) |
String |
getDeploymentStats(hudson.model.Fingerprint fp,
String containerId) |
String |
getDisplayName() |
hudson.model.Fingerprint |
getFingerprint(String containerId) |
String |
getIconFileName() |
Set<String> |
getImageIDs() |
DockerContainerRecord |
getLastDeploymentRecord(String containerId) |
hudson.security.Permission |
getRequiredPermission() |
hudson.search.Search |
getSearch() |
hudson.search.SearchIndex |
getSearchIndex() |
String |
getSearchName() |
String |
getSearchUrl() |
String |
getUrlName() |
List<DockerAPIReport> |
records() |
void |
removeContainerID(String containerID)
Removes the container ID from the registry.
|
void |
save() |
public hudson.model.Api getApi()
@Nonnull public Set<String> getContainerIDs()
@Exported @Nonnull public List<DockerAPIReport> records()
@Nonnull
public void addContainerID(@Nonnull
String containerID)
throws IOException
containerID - Container ID.IOException - Cannot save the list to the disk@Nonnull
public void removeContainerID(@Nonnull
String containerID)
throws IOException
containerID - Container ID.IOException - Cannot save the list to the disk@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
@CheckForNull
public hudson.model.Fingerprint getFingerprint(@Nonnull
String containerId)
@Nonnull public String getDeploymentStats(@Nonnull hudson.model.Fingerprint fp, @Nonnull String containerId)
@CheckForNull public DockerDeploymentFacet getDeploymentFacet(@Nonnull String containerId)
@CheckForNull public DockerContainerRecord getLastDeploymentRecord(@Nonnull String containerId)
@Nonnull public List<DockerContainerRecord> getContainerRecords()
public String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getUrlName()
getUrlName in interface hudson.model.Actionpublic List<DockerRecordsRegistry> getAllEvents()
DockerDeploymentFacets.@Deprecated public void doTestSubmitBuildRef(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter(required=true) String imageId, @QueryParameter(required=true) String jobName) throws IOException, javax.servlet.ServletException
req - Incoming requestrsp - ResponseimageId - image idjobName - job name, to which the facet should be attachedIOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic void doSubmitContainerStatus(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String inspectData,
@QueryParameter(required=false)
String hostId,
@QueryParameter(required=false)
String hostName,
@QueryParameter(required=false)
String status,
@QueryParameter(required=false)
long time,
@QueryParameter(required=false)@CheckForNull
String environment,
@QueryParameter(required=false)@CheckForNull
String imageName)
throws IOException,
javax.servlet.ServletException
req - Incoming requestrsp - Output responseinspectData - JSON output of docker inspect container (array of container infos)hostName - Optional name of the host, which submitted the event
"unknown" by defaulthostId - Optional host ID.
"unknown" by defaultstatus - Optional status of the container.
By default, an artificial DockerEventType.NONE will be used.time - Optional time when the event happened.
The time is specified in milliseconds since January 1, 1970, 00:00:00 GMT
Default value - current timeenvironment - Optional field, which describes the environmentimageName - Optional field, which provides the name of the imageIOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic void doSubmitEvent(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String json)
throws IOException,
javax.servlet.ServletException
DockerTraceabilityReport via API.req - Incoming requestrsp - Output responsejson - String representation of DockerTraceabilityReportjavax.servlet.ServletException - Servlet errorIOException - Processing errorpublic void doContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
Fingerprint page.req - Stapler requestrsp - Stapler responseid - Container ID. Method supports full 64-char IDs only.IOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic void doRemoveContainer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
req - Stapler requestrsp - Stapler responseid - Container ID. Method supports full 64-char IDs only.IOException - Cannot save the updated DockerEventsActionjavax.servlet.ServletException - Servlet exceptionpublic void doImage(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
Fingerprint page.req - Stapler requestrsp - Stapler responseid - Image ID. Method supports full 64-char IDs only.IOException - Request processing errorjavax.servlet.ServletException - Servlet errorpublic void doRawContainerInfo(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String containerId)
throws IOException,
javax.servlet.ServletException
req - Incoming requestrsp - Output responsecontainerId - ID of the container, for which the info should be retrieved.
Short container IDs are not supported.IOException - Processing errorjavax.servlet.ServletException - Servlet errorpublic org.kohsuke.stapler.HttpResponse doQueryContainer(@QueryParameter(required=true)
String id,
@QueryParameter(required=false)
String mode,
@QueryParameter(required=false)
long since,
@QueryParameter(required=false)
long until)
throws IOException,
javax.servlet.ServletException
id - ID of the container, for which the info should be retrieved.
Short container IDs are not supported.mode - QueryMode. Default value - QueryMode#inspectContainersince - Optional starting time.
If the value equals to 0, the filter will be ignored (default in QueryParameter).until - End time.
If the value equals to 0, the filter will be ignored (default in QueryParameter).IOException - Processing errorjavax.servlet.ServletException - Servlet errorpublic void doRawImageInfo(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter(required=true)
String id)
throws IOException,
javax.servlet.ServletException
req - Incoming requestrsp - Output responseid - ID of the image, for which the info should be retrieved.
Short container IDs are not supported.IOException - Processing errorjavax.servlet.ServletException - Servlet error@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public hudson.security.Permission getRequiredPermission()
public hudson.search.Search getSearch()
getSearch in interface hudson.search.SearchableModelObjectpublic String getSearchName()
getSearchName in interface hudson.search.SearchItempublic String getSearchUrl()
getSearchUrl in interface hudson.search.SearchItempublic hudson.search.SearchIndex getSearchIndex()
getSearchIndex in interface hudson.search.SearchItemprotected final hudson.XmlFile getConfigFile()
public void save()
throws IOException
save in interface hudson.model.SaveableIOExceptionCopyright © 2015. All Rights Reserved.