fix: credential typo
This commit is contained in:
parent
c718dc61a6
commit
8eef58939b
|
|
@ -43,12 +43,12 @@ func (b *AzureBlob) UnpackTarFromBuildContext() (string, error) {
|
||||||
return "", errors.New("AZURE_STORAGE_ACCESS_KEY environment variable is not set")
|
return "", errors.New("AZURE_STORAGE_ACCESS_KEY environment variable is not set")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get storage accoutname for Azure Blob Storage
|
// Get storage accountName for Azure Blob Storage
|
||||||
u, _ := url.Parse(b.context)
|
u, _ := url.Parse(b.context)
|
||||||
parts := azblob.NewBlobURLParts(*u)
|
parts := azblob.NewBlobURLParts(*u)
|
||||||
accountName := strings.Split(parts.Host, ".")[0]
|
accountName := strings.Split(parts.Host, ".")[0]
|
||||||
|
|
||||||
// Generate credentail with accountname and accountkey
|
// Generate credential with accountName and accountKey
|
||||||
credential, err := azblob.NewSharedKeyCredential(accountName, accountKey)
|
credential, err := azblob.NewSharedKeyCredential(accountName, accountKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return parts.Host, err
|
return parts.Host, err
|
||||||
|
|
@ -62,7 +62,7 @@ func (b *AzureBlob) UnpackTarFromBuildContext() (string, error) {
|
||||||
return tarPath, err
|
return tarPath, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Downloading contextfile from Azure Blob Storage
|
// Downloading context file from Azure Blob Storage
|
||||||
p := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
p := azblob.NewPipeline(credential, azblob.PipelineOptions{})
|
||||||
blobURL := azblob.NewBlobURL(*u, p)
|
blobURL := azblob.NewBlobURL(*u, p)
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue