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
Artifact up/download to/from Azure Blob Storage #2318
Conversation
744fc46
to
85cd66f
Compare
260df95
to
d2fd7f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, I have a suggestion which I think you should implement. I guess not all the proposed AzureBlobLocation
struct is needed in all the places it would have to be plumbed to, but I think it's still useful to create this structure.
@@ -10,5 +12,5 @@ type Uploader interface { | |||
URL(*api.Artifact) string | |||
|
|||
// The actual uploading of the file | |||
Upload(*api.Artifact) error | |||
Upload(context.Context, *api.Artifact) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving this internal package party we are having!
2d5202f
to
8479f91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great!
561fb77
to
22c2635
Compare
*_ACCESS_KEY is already redacted by default. *_CONNECTION_STRING is a reasonable addition, IMO.
22c2635
to
764384c
Compare
This adds Azure Blob Storage as an accepted destination for artifacts.
To start with, it uses DefaultAzureCredential. This is fairly flexible, but unless the container is public, uploaded URLs cannot be accessed by default.
In the third commit I add support for account keys (shared key credentials), which can also be configured using a connection string. The shared key is mandatory for generating SAS (shared access signatures) URLs, which include a token allowing temporary access to a blob.