Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Unverified Commit ac731bd6 authored by Idriss's avatar Idriss
Browse files

Add ovh region and bucket name extractions

parent d8e9b8a6
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ mirror:
deliver:
stage: deliver
script:
- setsid ./ci/docker-deliver.sh "bucket-backup" "2.1"
- setsid ./ci/docker-deliver.sh "bucket-backup" "2.2"
only:
refs:
- /^(main.*)$/
......
......@@ -38,7 +38,17 @@ bucket_backup() {
endpoint="https://s3.${region}.scw.cloud"
bucket_subpath=""
[[ $bucket_name ]] && bucket_subpath="${bucket_name}/"
echo "[bucket_backup] region=${region}, bucket_name=${bucket_name}, endpoint=${endpoint}"
echo "[bucket_backup][scaleway] region=${region}, bucket_name=${bucket_name}, endpoint=${endpoint}"
fi
# If you use ovh endpoint, pretty same things
if [[ $endpoint =~ https://.*.s3..*.perf.cloud.ovh.net ]]; then
bucket_name="$(echo $endpoint|sed "s/https:\/\/\(.*\)\.s3\..*\.perf\.cloud\.ovh\.net/\1/g")"
region="$(echo $endpoint|sed "s/https:\/\/.*\.s3\.\(.*\)\.perf\.cloud\.ovh\.net/\1/g")"
endpoint="https://s3.${region}.perf.cloud.ovh.net"
bucket_subpath=""
[[ $bucket_name ]] && bucket_subpath="${bucket_name}/"
echo "[bucket_backup][ovh] region=${region}, bucket_name=${bucket_name}, endpoint=${endpoint}"
fi
"${MC_BIN}" config host add "r${dest}" "${endpoint}" "${access_key}" "${secret_key}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment