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

Add Azure Storage Backend #89

Merged
merged 4 commits into from
Feb 7, 2020
Merged

Add Azure Storage Backend #89

merged 4 commits into from
Feb 7, 2020

Conversation

spacentropy
Copy link
Contributor

Fixes #62

Proposed Changes

  • Azure Storage backend

Description

I just added Azure blob storage backend.

Checklist

  • Read the CONTRIBUTING document.
  • Read the CODE OF CONDUCT document.
  • Add tests to cover changes.
  • Ensure your code follows the code style of this project.
  • Ensure CI and all other PR checks are green OR
    • Code compiles correctly.
    • Created tests which fail without the change (if possible).
    • All new and existing tests passed.
  • Add your changes to Unreleased section of CHANGELOG.
  • Improve and update the README (if necessary).
  • Ensure documentation is up-to-date. The same file will be updated in plugin index when your PR is accepted, so it will be available for end-users at http://plugins.drone.io.

@kakkoyun
Copy link
Contributor

kakkoyun commented Feb 5, 2020

@spacentropy Wow. This looks great at a first glimpse. Thank you very much.
I'll thoroughly review this as soon as I can.

@spacentropy
Copy link
Contributor Author

Thanks. Let me green the build first, there are multiple linter errors :( I didn't use golangci-lint. Sorry for that, will fix now.

Copy link
Contributor

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
I have only a couple of nits. You can fix them if you want, in another PR.
I'm gonna go ahead and merge this one.
Thanks a lot for your contribution 🎉

@@ -2,7 +2,7 @@
date: 2019-03-19T00:00:00+00:00
title: Drone Cache
author: meltwater
tags: [ cache, amazon, aws, s3, volume ]
tags: [ cache, amazon, aws, s3, azure, volume ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags: [ cache, amazon, aws, s3, azure, volume ]
tags: [ cache, amazon, aws, s3, azure, blob, volume, storage ]

@@ -354,6 +354,15 @@ bucket
region
: AWS bucket region. (`us-east-1`, `eu-west-1`, ...)

account_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add prefixes to these. We don't add prefixes to AWS ones to be back-compatible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually add the azure prefix we just need to update here in docs.

func (c *azureBackend) Put(p string, src io.ReadSeeker) error {
blobURL := c.containerURL.NewBlockBlobURL(p)

fmt.Printf("uploading the file with blob name: %s\n", p)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use log, or remove this one. If you don't have logger available.

@kakkoyun kakkoyun merged commit 254d34d into meltwater:master Feb 7, 2020
@pastushenkoy pastushenkoy deleted the azureblob branch May 25, 2020 16:44
@pastushenkoy pastushenkoy restored the azureblob branch May 25, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Azure Storage Backend
2 participants