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

Allow custom S3 domain #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bbailleux
Copy link

@bbailleux bbailleux commented May 7, 2024

This PR aims at allowing user to specify an alternate domain as request target. Thus, it will be possible to use a personal or custom instance of S3-compatible on-line storage service.

Especially useful for companies operating private cloud with S3-compatible service.

Two steps:

First step: lint

The first commit is:

  • Apply changes required to run successfully shellcheck on all scripts (see style guide:
    https://google.github.io/styleguide/shellguide.html#shellcheck)
  • Fix a few style guide oversights
  • Fix an incomplete test in assertArgument()
  • Update README to comply with linter issues
  • Update URL of style guide (as googlecode.com no longer exists)

Second step: new feature

The new feature has been proposed in second commit

It adds a -d or --domain command-line option (or make use of S3_DEFAULT_DOMAIN env. var.) to replace default domain (i.e. s3.amazonaws.com) with custom domain

- Apply changes required to run successfully `shellcheck` on all
scripts (see style guide:
https://google.github.io/styleguide/shellguide.html#shellcheck)
- Fix a few style guide oversights
- Fix an incomplete test in `assertArgument()`
- Update README to comply with linter issues
- Update URL of style guide (as `googlecode.com` no longer exists)
- Add "-d" / "--domain" option to use custom (e.g. private) S3 domain
  instead of `amazonaws.com` default domain
- Update documentation
- Update test script
@bbailleux bbailleux marked this pull request as ready for review May 13, 2024 12:27
@bbailleux bbailleux changed the title WIP: Allow custom S3 domain Allow custom S3 domain May 13, 2024
@bbailleux
Copy link
Author

Hello @cvle

Can you please consider either reviewing this PR or archiving this repo, so that I can apply the proposed change to my own fork of this nice and useful tool?

Thanks in advance / Danke schön.

Commands' help now explain how to use _custom domains_

Signed-off-by: Bailleux Benoît <[email protected]>
- Add the required option to prevent cUrl to display request progress
- Add proper copyright and dev. mail address
- Add license preamble to `lib/common.sh` file

Signed-off-by: Bailleux Benoît <[email protected]>
When a custom domain is specified (with `-d` option), it was not
handled the same way as default domain, thus leading to incoherent
behavior

Change:

- Manages custom domain the same way as default one and
  prepends "s3" or "s3-<region>" as needed
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.

1 participant