mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
Add support for Azure storage as a publishing backend
This adds a new configuration setting: AzurePublishEndpoints, similar to the existing S3PublishEndpoints and SwiftPublishEndpoints. For each endpoint, the following has to be defined: - accountName - accountKey - container - prefix Azure tests require the following environment variables to be set: - AZURE_STORAGE_ACCOUNT - AZURE_STORAGE_ACCESS_KEY With either of these not set, Azure-specific tests are skipped.
This commit is contained in:
@@ -30,6 +30,7 @@ type ConfigStructure struct { // nolint: maligned
|
||||
FileSystemPublishRoots map[string]FileSystemPublishRoot `json:"FileSystemPublishEndpoints"`
|
||||
S3PublishRoots map[string]S3PublishRoot `json:"S3PublishEndpoints"`
|
||||
SwiftPublishRoots map[string]SwiftPublishRoot `json:"SwiftPublishEndpoints"`
|
||||
AzurePublishRoots map[string]AzurePublishRoot `json:"AzurePublishEndpoints"`
|
||||
}
|
||||
|
||||
// FileSystemPublishRoot describes single filesystem publishing entry point
|
||||
@@ -72,6 +73,14 @@ type SwiftPublishRoot struct {
|
||||
Container string `json:"container"`
|
||||
}
|
||||
|
||||
// AzurePublishRoot describes single Azure publishing entry point
|
||||
type AzurePublishRoot struct {
|
||||
AccountName string `json:"accountName"`
|
||||
AccountKey string `json:"accountKey"`
|
||||
Container string `json:"container"`
|
||||
Prefix string `json:"prefix"`
|
||||
}
|
||||
|
||||
// Config is configuration for aptly, shared by all modules
|
||||
var Config = ConfigStructure{
|
||||
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
|
||||
@@ -93,6 +102,7 @@ var Config = ConfigStructure{
|
||||
FileSystemPublishRoots: map[string]FileSystemPublishRoot{},
|
||||
S3PublishRoots: map[string]S3PublishRoot{},
|
||||
SwiftPublishRoots: map[string]SwiftPublishRoot{},
|
||||
AzurePublishRoots: map[string]AzurePublishRoot{},
|
||||
}
|
||||
|
||||
// LoadConfig loads configuration from json file
|
||||
|
||||
Reference in New Issue
Block a user