Interface PluginBuildServerProvider
public interface PluginBuildServerProvider
Build Server Provider SPI.
Provides the ability for a plugin to be a "build server provider"; that is a plugin that provides the ability to access and manage build jobs on a build/automation server.
- Since:
- 7.8
-
Method Summary
Modifier and TypeMethodDescriptiongetBuildServer
(String id) Get thePluginBuildServer
for the given ID.getBuildServer
(javax.servlet.http.HttpServletRequest servletRequest, Map<String, Object> requestBody) Given a request, identify the build server that made the request.
-
Method Details
-
getBuildServer
Get thePluginBuildServer
for the given ID.- Parameters:
id
- the ID of the build server to get- Returns:
- the associated
PluginBuildServer
, orOptional.empty()
if there is no build server for the given ID
-
getBuildServer
@Nonnull Optional<PluginBuildServer> getBuildServer(@Nonnull javax.servlet.http.HttpServletRequest servletRequest, @Nonnull Map<String, Object> requestBody) Given a request, identify the build server that made the request.This is used to establish the concept of a trusted build status. A build status must be verified/trusted for the purposes of certain functions such as:
- Presenting a list of downloadable build artifacts
- Permitting actions such as running a build from Bitbucket
Optional.empty()
.- Parameters:
servletRequest
- the request for which the requester will be determinedrequestBody
- a map of all fields included in the build status request, fields of this map can be used to verify the build server- Returns:
- An
Optional
containing the build server if the request can be validated as certainly originating from that build server. If the request cannot be validated as coming from a known/trusted build server this provider is responsible for, thenOptional.empty()
is returned.
-