public class DeploymentsApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DefaultBranchProtectionLevel, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectAccessTokenScope, Constants.ProjectCreationLevel, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.SubgroupCreationLevel, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
DeploymentsApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
Deployment |
addDeployment(java.lang.Object projectIdOrPath,
java.lang.String environment,
java.lang.String sha,
java.lang.String ref,
java.lang.Boolean tag,
Constants.DeploymentStatus status)
Creates a new deployment for a project.
|
Deployment |
getDeployment(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId)
Get a specific deployment.
|
java.util.List<MergeRequest> |
getMergeRequests(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId)
Get a list of Merge Requests shipped with a given deployment.
|
Pager<MergeRequest> |
getMergeRequests(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId,
int itemsPerPage)
Get a Pager of Merge Requests shipped with a given deployment.
|
java.util.stream.Stream<MergeRequest> |
getMergeRequestsStream(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId)
Get a Stream of Merge Requests shipped with a given deployment.
|
java.util.Optional<Deployment> |
getOptionalDeployment(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId)
Get a specific deployment as an Optional instance.
|
java.util.List<Deployment> |
getProjectDeployments(java.lang.Object projectIdOrPath)
Get a list of deployments for the specified project.
|
Pager<Deployment> |
getProjectDeployments(java.lang.Object projectIdOrPath,
DeploymentFilter filter)
Get a Pager of all deployments for the specified project.
|
Pager<Deployment> |
getProjectDeployments(java.lang.Object projectIdOrPath,
DeploymentFilter filter,
int itemsPerPage)
Get a Pager of all deployments for the specified project.
|
Pager<Deployment> |
getProjectDeployments(java.lang.Object projectIdOrPath,
int itemsPerPage)
Get a Pager of all deployments for the specified project.
|
java.util.stream.Stream<Deployment> |
getProjectDeploymentsStream(java.lang.Object projectIdOrPath)
Get a Stream of all deployments for the specified project.
|
java.util.stream.Stream<Deployment> |
getProjectDeploymentsStream(java.lang.Object projectIdOrPath,
DeploymentFilter filter)
Get a Stream of all deployments for the specified project.
|
Deployment |
updateDeployment(java.lang.Object projectIdOrPath,
java.lang.Long deploymentId,
Constants.DeploymentStatus status)
Updates an existing project deploy key.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
public DeploymentsApi(GitLabApi gitLabApi)
public java.util.List<Deployment> getProjectDeployments(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<Deployment> getProjectDeployments(java.lang.Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Deployments instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Pager<Deployment> getProjectDeployments(java.lang.Object projectIdOrPath, DeploymentFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- DeploymentFilter
a DeploymentFilter instance with the filter settingsGitLabApiException
- if any exception occurspublic Pager<Deployment> getProjectDeployments(java.lang.Object projectIdOrPath, DeploymentFilter filter, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- DeploymentFilter
a DeploymentFilter instance with the filter settingsitemsPerPage
- the number of Deployments instances that will be fetched per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Deployment> getProjectDeploymentsStream(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Deployment> getProjectDeploymentsStream(java.lang.Object projectIdOrPath, DeploymentFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- DeploymentFilter
a DeploymentFilter instance with the filter settingsGitLabApiException
- if any exception occurspublic Deployment getDeployment(java.lang.Object projectIdOrPath, java.lang.Long deploymentId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- the ID of a project's deploymentGitLabApiException
- if any exception occurspublic java.util.Optional<Deployment> getOptionalDeployment(java.lang.Object projectIdOrPath, java.lang.Long deploymentId)
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- the ID of a project's deploymentpublic Deployment addDeployment(java.lang.Object projectIdOrPath, java.lang.String environment, java.lang.String sha, java.lang.String ref, java.lang.Boolean tag, Constants.DeploymentStatus status) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/deployments
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceenvironment
- The name of the environment to create the deployment for, requiredsha
- The SHA of the commit that is deployed, requiredref
- The name of the branch or tag that is deployed, requiredtag
- A boolean that indicates if the deployed ref is a tag (true) or not (false), requiredstatus
- The status to filter deployments by, requiredGitLabApiException
- if any exception occurspublic Deployment updateDeployment(java.lang.Object projectIdOrPath, java.lang.Long deploymentId, Constants.DeploymentStatus status) throws GitLabApiException
GitLab Endpoint: PUT /projects/:id/deployments/:key_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- The ID of the deployment to update, requiredstatus
- The new status of the deployment, requiredGitLabApiException
- if any exception occurspublic java.util.List<MergeRequest> getMergeRequests(java.lang.Object projectIdOrPath, java.lang.Long deploymentId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- The ID of the deployment to update, requiredGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<MergeRequest> getMergeRequests(java.lang.Object projectIdOrPath, java.lang.Long deploymentId, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- The ID of the deployment to update, requireditemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic java.util.stream.Stream<MergeRequest> getMergeRequestsStream(java.lang.Object projectIdOrPath, java.lang.Long deploymentId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/deployments/:deployment_id/merge_requests
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancedeploymentId
- The ID of the deployment to update, requiredGitLabApiException
- GitLabApiException if any exception occurs during execution