in PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/webapp/runner/webAppContainer/WebAppContainerConfiguration.kt [43:71]
override fun checkConfiguration() {
val options = getState() ?: return
with(options) {
isAccountSignedIn()
if (webAppName.isNullOrEmpty()) throw RuntimeConfigurationError("Web App name is not provided")
if (subscriptionId.isNullOrEmpty()) throw RuntimeConfigurationError("Subscription is not provided")
if (resourceGroupName.isNullOrEmpty()) throw RuntimeConfigurationError("Resource group is not provided")
if (region.isNullOrEmpty()) throw RuntimeConfigurationError("Region is not provided")
if (appServicePlanName.isNullOrEmpty()) throw RuntimeConfigurationError("App Service plan name is not provided")
if (appServicePlanResourceGroupName.isNullOrEmpty()) throw RuntimeConfigurationError("App Service plan resource group is not provided")
if (pricingTier.isNullOrEmpty()) throw RuntimeConfigurationError("Pricing tier is not provided")
if (pricingSize.isNullOrEmpty()) throw RuntimeConfigurationError("Pricing size is not provided")
val repository = imageRepository
if (repository.isNullOrEmpty()) throw RuntimeConfigurationError("Image repository is not provided")
if (repository.length > 255) throw RuntimeConfigurationError("The length of image repository must be less than 256 characters")
if (repository.endsWith('/')) throw RuntimeConfigurationError("The repository name should not end with '/'")
val tag = imageTag
if (tag.isNullOrEmpty()) throw RuntimeConfigurationError("Image tag is not provided")
if (tag.length > 127) throw RuntimeConfigurationError("The length of tag name must be less than 128 characters")
if (!tagRegex.matches(tag)) throw RuntimeConfigurationError("Invalid tag: $tag, should follow: $TAG_REGEX_PATTERN")
val repositoryParts = repository.split('/')
if (repositoryParts.last().isEmpty()) throw RuntimeConfigurationError("Image name is not provided")
repositoryParts.forEach {
if (!repoComponentRegex.matches(it)) throw RuntimeConfigurationError("Invalid repository component: $it, should follow: $REPO_COMPONENT_REGEX_PATTERN")
}
}
}