Interface DeploymentImportService
-
- All Known Implementing Classes:
DeploymentImportServiceImpl
@ExperimentalApi public interface DeploymentImportServiceService to import deployment project configurations from human readable format.- Since:
- 6.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull com.atlassian.bamboo.specs.api.model.deployment.DeploymentPropertiesconvertYamlToDeployment(@NotNull String yaml, @NotNull RssPermissions rssPermissions)Converts data from a YAML document to deployment properties.@NotNull com.atlassian.bamboo.specs.api.model.permission.DeploymentPermissionsPropertiesconvertYamlToDeploymentPermissions(String yaml)Converts data from a YAML document to deployment permissions properties.@NotNull com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsPropertiesconvertYamlToEnvironmentPermissions(String yaml)Converts data from a YAML document to environment permissions properties.@NotNull DeploymentProjectimportDeployment(@NotNull com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties deploymentProperties, @Nullable com.atlassian.user.User userForCreation, @NotNull RssPermissions rssPermissions, boolean noChangesInProperties)Validates exported deployment properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.voidimportDeploymentEnvironmentPermissions(@NotNull com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsProperties environmentPermission, @NotNull RssPermissions rssPermissions)Import permissions for deployment environment.voidimportDeploymentPermissions(@NotNull com.atlassian.bamboo.specs.api.model.permission.DeploymentPermissionsProperties deploymentPermissionProperties, @NotNull RssPermissions rssPermissions)Import permissions for deployment project.voidimportDeploymentPermissions(@Nullable String deploymentName, @Nullable com.atlassian.bamboo.specs.api.model.BambooOidProperties deploymentOid, @NotNull com.atlassian.bamboo.specs.api.model.permission.PermissionsProperties defaultEnvironmentPermissions, @NotNull List<com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsProperties> environmentPermissions, @NotNull RssPermissions rssPermissions)Import environments permissions in a bulk.voidvalidate(com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties deploymentProperties, @NotNull RssPermissions rssPermissions)Validates exported deployment properties within Bamboo context (e.g. verifying database integrity).
-
-
-
Method Detail
-
convertYamlToDeployment
@NotNull @NotNull com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties convertYamlToDeployment(@NotNull @NotNull String yaml, @NotNull @NotNull RssPermissions rssPermissions) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException, YamlValidationExceptionConverts data from a YAML document to deployment properties.This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).
- Parameters:
yaml- YAML String containing definition of deployment- Returns:
- deployment properties after contextless validation
- Throws:
YamlValidationException- if the format of the YAML file is invalidcom.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if the imported properties were not valid
-
validate
void validate(com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties deploymentProperties, @NotNull @NotNull RssPermissions rssPermissions) throws YamlValidationExceptionValidates exported deployment properties within Bamboo context (e.g. verifying database integrity).- Parameters:
deploymentProperties- deployment properties to importrssPermissions- deployment projects which are allowed for modification; since 6.2- Throws:
YamlValidationException- if validation failed
-
convertYamlToDeploymentPermissions
@NotNull @NotNull com.atlassian.bamboo.specs.api.model.permission.DeploymentPermissionsProperties convertYamlToDeploymentPermissions(String yaml) throws YamlValidationException
Converts data from a YAML document to deployment permissions properties.This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).
- Parameters:
yaml- YAML String containing definition of deployment permissions- Returns:
- deployment permissions properties after contextless validation
- Throws:
YamlValidationException- if the format of the YAML file is invalidcom.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if the imported properties were not valid
-
convertYamlToEnvironmentPermissions
@NotNull @NotNull com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsProperties convertYamlToEnvironmentPermissions(String yaml) throws YamlValidationException
Converts data from a YAML document to environment permissions properties.This method performs validation of YAML types and of the properties without Bamboo context (e.g. no database integrity is verified).
- Parameters:
yaml- YAML String containing definition of environment permissions- Returns:
- environment permissions properties after contextless validation
- Throws:
YamlValidationException- if the format of the YAML file is invalidcom.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if the imported properties were not valid
-
importDeployment
@NotNull @NotNull DeploymentProject importDeployment(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.deployment.DeploymentProperties deploymentProperties, @Nullable @Nullable com.atlassian.user.User userForCreation, @NotNull @NotNull RssPermissions rssPermissions, boolean noChangesInProperties) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
Validates exported deployment properties within Bamboo context (e.g. verifying database integrity), then imports the data into the database.- Parameters:
deploymentProperties- deployment properties to importuserForCreation- user invoking the importrssPermissions- deployment projects which are allowed for modification; since 6.2- Returns:
- saved deployment entity
- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if data validation fails
-
importDeploymentPermissions
void importDeploymentPermissions(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.permission.DeploymentPermissionsProperties deploymentPermissionProperties, @NotNull @NotNull RssPermissions rssPermissions) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationExceptionImport permissions for deployment project.- Parameters:
deploymentPermissionProperties- deployment permissions to import- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if data validation fails
-
importDeploymentEnvironmentPermissions
void importDeploymentEnvironmentPermissions(@NotNull @NotNull com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsProperties environmentPermission, @NotNull @NotNull RssPermissions rssPermissions) throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationExceptionImport permissions for deployment environment.- Parameters:
environmentPermission- environment permissions to import.- Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- if data validation fails
-
importDeploymentPermissions
void importDeploymentPermissions(@Nullable @Nullable String deploymentName, @Nullable @Nullable com.atlassian.bamboo.specs.api.model.BambooOidProperties deploymentOid, @NotNull @NotNull com.atlassian.bamboo.specs.api.model.permission.PermissionsProperties defaultEnvironmentPermissions, @NotNull @NotNull List<com.atlassian.bamboo.specs.api.model.permission.EnvironmentPermissionsProperties> environmentPermissions, @NotNull @NotNull RssPermissions rssPermissions)Import environments permissions in a bulk.- Parameters:
deploymentName- name of the deployment projectdeploymentOid- oid name of the deployment projectdefaultEnvironmentPermissions- default environment permission will be used for all environments if they not specified at #environmentPermissions argumentenvironmentPermissions- environment permissionsrssPermissions- repository permissions
-
-