Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fixed inputs for Azure #257

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
[#256](https://github.com/meltwater/drone-cache/pull/257) Fixed inputs for Azure

### Added
[#230](https://github.com/meltwater/drone-cache/pull/233) Added command line flag to enable/disable SSL for AWS S3
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func main() {
EnvVars: []string{"PLUGIN_ACCOUNT_KEY", "AZURE_ACCOUNT_KEY"},
},
&cli.StringFlag{
Name: "azure.blob-container-name",
Name: "azure.container-name",
Usage: "Azure Blob Storage container name",
EnvVars: []string{"PLUGIN_CONTAINER", "AZURE_CONTAINER_NAME"},
},
Expand Down
5 changes: 5 additions & 0 deletions storage/backend/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ func New(l log.Logger, c Config) (*Backend, error) {
// 3. Azurite has different URL pattern than production Azure Blob Storage.
var blobURL *url.URL
if c.Azurite {
fmt.Println("Container Name: %s", c.ContainerName)
shiv-am0 marked this conversation as resolved.
Show resolved Hide resolved
level.Info(l).Log("Container name: ", c.ContainerName)
blobURL, err = url.Parse(fmt.Sprintf("http://%s/%s/%s", c.BlobStorageURL, c.AccountName, c.ContainerName))
} else {
// add print statement
fmt.Println("Container Name: %s", c.ContainerName)
shiv-am0 marked this conversation as resolved.
Show resolved Hide resolved
level.Info(l).Log("Container name: ", c.ContainerName)
blobURL, err = url.Parse(fmt.Sprintf("https://%s.%s/%s", c.AccountName, c.BlobStorageURL, c.ContainerName))
}

Expand Down