Description: (#393)
Added support for virtual-host style access for Huawei Cloud OBS. This is achieved by introducing the AWS_S3_BUCKET_LOOKUP environment variable and adding the s3.bucket-lookup=dns option to the parameters. Changes: Set AWS_S3_BUCKET_LOOKUP environment variable. Included s3.bucket-lookup=dns in the S3 configuration options to ensure compatibility with Huawei OBS DNS-based bucket addressing.
This commit is contained in:
parent
ba8b599059
commit
c69615b3b6
1 changed files with 9 additions and 0 deletions
|
|
@ -133,6 +133,11 @@ export const buildEnv = async (config: RepositoryConfig, organizationId: string)
|
|||
case "s3":
|
||||
env.AWS_ACCESS_KEY_ID = await cryptoUtils.resolveSecret(config.accessKeyId);
|
||||
env.AWS_SECRET_ACCESS_KEY = await cryptoUtils.resolveSecret(config.secretAccessKey);
|
||||
|
||||
// Huawei OBS requires virtual-hosted style access
|
||||
if (config.endpoint.includes("myhuaweicloud")) {
|
||||
env.AWS_S3_BUCKET_LOOKUP = "dns";
|
||||
}
|
||||
break;
|
||||
case "r2":
|
||||
env.AWS_ACCESS_KEY_ID = await cryptoUtils.resolveSecret(config.accessKeyId);
|
||||
|
|
@ -955,6 +960,10 @@ export const addCommonArgs = (
|
|||
args.push("-o", `sftp.args=${env._SFTP_SSH_ARGS}`);
|
||||
}
|
||||
|
||||
if (env.AWS_S3_BUCKET_LOOKUP === "dns") {
|
||||
args.push("-o", "s3.bucket-lookup=dns");
|
||||
}
|
||||
|
||||
if (env._INSECURE_TLS === "true") {
|
||||
args.push("--insecure-tls");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue