Skip to content

Commit

Permalink
feat(provider): support clevercloud (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
delyriand authored Sep 25, 2024
1 parent 94a3bbf commit 81ca7fa
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ Currently the below providers are supported, but it could be used with other pro
- Scaleway
- Cloudflare
- Vultr
- CleverCloud

## Inputs

### `provider`

**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare, Vultr are supported.
**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare, Vultr, CleverCloud are supported.

### `secret_key`

Expand Down
10 changes: 9 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24969,7 +24969,15 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
})
}),
clevercloud: ({ region = 'US', access_key = '', secret_key = '' }) => ({
bucket_location: region,
host_base: `cellar-c2.services.clever-cloud.com`,
host_bucket: `%(bucket)s.cellar-c2.services.clever-cloud.com`,
website_endpoint: '',
access_key,
secret_key,
}),
}

const makeConf = (provider) => {
Expand Down
10 changes: 9 additions & 1 deletion src/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ const providers = {
website_endpoint: '',
access_key,
secret_key,
})
}),
clevercloud: ({ region = 'US', access_key = '', secret_key = '' }) => ({
bucket_location: region,
host_base: `cellar-c2.services.clever-cloud.com`,
host_bucket: `%(bucket)s.cellar-c2.services.clever-cloud.com`,
website_endpoint: '',
access_key,
secret_key,
}),
}

const makeConf = (provider) => {
Expand Down
11 changes: 11 additions & 0 deletions src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,14 @@ const vultrConf = makeConf(providers.vultr({
for (const line of vultrConf) {
vultrWriter.write(line + '\r\n')
}


const clevercloudWriter = createWriteStream('assets/test-results/clevercloud')
const clevercloudConf = makeConf(providers.clevercloud({
access_key: 'top-secret',
secret_key: 'more secret'
}))

for (const line of clevercloudConf) {
clevercloudWriter.write(line + '\r\n')
}

0 comments on commit 81ca7fa

Please sign in to comment.