@Singleton public class DeploymentEnvironmentResource extends Object
Constructor and Description |
---|
DeploymentEnvironmentResource(AgentAssignmentService agentAssignmentService,
AgentManager agentManager,
EnvironmentService environmentService,
EnvironmentCustomConfigService environmentCustomConfigService,
DeploymentResultService deploymentResultService,
DeploymentProjectService deploymentProjectService,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
com.atlassian.event.api.EventPublisher eventPublisher,
ElasticImageConfigurationManager elasticImageConfigurationManager,
EnvironmentRequirementService environmentRequirementService,
VariableDefinitionManager variableDefinitionManager) |
Modifier and Type | Method and Description |
---|---|
RestAgentAssignmentExecutorDetails |
addAgentAssignmentForEnvironment(long environmentId,
Map<String,String> agentAssignmentKey)
Add agent assignment for environment.
|
List<RestAgentAssignmentExecutorDetails> |
findAssignedAgentsByEnvironment(long environmentId)
Provide list of agents/images assigned to given environment.
|
javax.ws.rs.core.Response |
findPossibleAgentsForEnvironment(long environmentId,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of agents/images which can be dedicated for given environment.
|
RestDeploymentResultList |
getDeploymentResultList(long environmentId,
String expandParam,
javax.ws.rs.core.UriInfo uriInfo)
Provide list of versions deployed to environment.
|
RestDockerPipelineConfiguration |
getDockerPipelinesConfiguration(long environmentId)
Retrieves Docker configuration for given environment.
|
RestEnvironmentWithConfigCounts |
getEnvironment(long environmentId)
Provide summary of a single environment.
|
javax.ws.rs.core.Response |
moveEnvironment(Long environmentId,
String positionString,
Long relativeEnvironmentId)
Change environment position within deployment project.
|
javax.ws.rs.core.Response |
removeAgentAssignmentFromEnvironment(long environmentId,
String executorKey)
Remove agent/image from list of dedicated executors for given environment.
|
javax.ws.rs.core.Response |
saveDockerPipelinesConfiguration(long environmentId,
RestDockerPipelineConfiguration restDockerPipelineConfiguration)
Saves Docker configuration for given environment.
|
public DeploymentEnvironmentResource(AgentAssignmentService agentAssignmentService, AgentManager agentManager, EnvironmentService environmentService, EnvironmentCustomConfigService environmentCustomConfigService, DeploymentResultService deploymentResultService, DeploymentProjectService deploymentProjectService, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.event.api.EventPublisher eventPublisher, ElasticImageConfigurationManager elasticImageConfigurationManager, EnvironmentRequirementService environmentRequirementService, VariableDefinitionManager variableDefinitionManager)
public RestEnvironmentWithConfigCounts getEnvironment(long environmentId)
environmentId
- environment idpublic RestDeploymentResultList getDeploymentResultList(long environmentId, String expandParam, @Context javax.ws.rs.core.UriInfo uriInfo)
environmentId
- deployment environment idexpandParam
- expands deployment versions. Possible values are: resultsuriInfo
- uri infopublic List<RestAgentAssignmentExecutorDetails> findAssignedAgentsByEnvironment(long environmentId)
environmentId
- environment idpublic javax.ws.rs.core.Response findPossibleAgentsForEnvironment(long environmentId, @Nullable String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo)
environmentId
- environment idsearchTerm
- part of the agent or image name to filter response. Use empty value to receive all agents/images.uriInfo
- uri infopublic RestAgentAssignmentExecutorDetails addAgentAssignmentForEnvironment(long environmentId, Map<String,String> agentAssignmentKey) throws WebValidationException
ExecutorKey
.environmentId
- environment idagentAssignmentKey
- map with 'name' key which reference agent assignment key as valueWebValidationException
- if validation failspublic javax.ws.rs.core.Response removeAgentAssignmentFromEnvironment(long environmentId, String executorKey) throws WebValidationException
environmentId
- environment idexecutorKey
- key is parsed by ExecutorKey
WebValidationException
- if validation failspublic RestDockerPipelineConfiguration getDockerPipelinesConfiguration(long environmentId)
environmentId
- environment idpublic javax.ws.rs.core.Response saveDockerPipelinesConfiguration(long environmentId, @RequestBody RestDockerPipelineConfiguration restDockerPipelineConfiguration)
environmentId
- environment idpublic javax.ws.rs.core.Response moveEnvironment(Long environmentId, @Nullable String positionString, Long relativeEnvironmentId) throws WebValidationException, NotFoundException
environmentId
- environment idpositionString
- position. Possible values: AFTER or BEFORE.relativeEnvironmentId
- environment id which referenced environment should be placed before or after.WebValidationException
NotFoundException
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.