This commit is contained in:
Oleksii Khaliavka 2025-06-05 11:42:56 +03:00 committed by GitHub
commit 7380280e36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package buildcontext
import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
@ -48,6 +49,8 @@ func (b *AzureBlob) UnpackTarFromBuildContext() (string, error) {
if err != nil {
return parts.Host, err
}
accountUrl := fmt.Sprintf("%s://%s", parts.Scheme, parts.Host)
accountName := strings.Split(parts.Host, ".")[0]
// Generate credential with accountName and accountKey
@ -65,7 +68,7 @@ func (b *AzureBlob) UnpackTarFromBuildContext() (string, error) {
}
// Downloading context file from Azure Blob Storage
client, err := azblob.NewClientWithSharedKeyCredential(b.context, credential, nil)
client, err := azblob.NewClientWithSharedKeyCredential(accountUrl, credential, nil)
if err != nil {
return parts.Host, err
}