Hello, everyone,
it is not possible to sync the contents of a directory (and not the directory itself) with the Storage Account in Azure with Bitbucket Pipelines Pipe: Azure Storage Deploy.
https://bitbucket.org/atlassian/azure-storage-deploy/src/master/
It fails with error: FileNotFoundError: [Errno 2] No such file or directory: 'bar/*'
I came across the blog post from 2019
https://cloudblogs.microsoft.com/opensource/2019/03/12/now-available-bitbucket-pipes-microsoft-azure/
@Victor Ferreira Hi. Microsoft pipe: https://bitbucket.org/microsoft/azure-storage-deploy/src/master/ is not supported anymore.To deploy a directory with https://bitbucket.org/atlassian/azure-storage-deploy/src/master/ try to provide a directory name without wildcard:
script: - pipe: atlassian/azure-storage-deploy:2.2.1 variables: SOURCE: 'bar' DESTINATION_STORAGE_ACCOUNT_NAME: 'https://mystorageaccount.blob.core.windows.net' DESTINATION_SAS_TOKEN: $AZURE_STORAGE_SAS_TOKEN DESTINATION_CONTAINER_NAME: 'my-container'
Regards, Igor
@Oleksandr Kyrdan
I am trying to deploy to azure using atlassian/azure-storage-deploy:2.2.1 pipe but i am having a hard time getting the content of directory copied to azure. I keep getting the whole directory copied. here is my ymal
image: node:20.11.1
definitions:caches:yarn: node_modules
pipelines:branches:master:- step:name: 'Build'caches:- yarnscript:- echo "Your build and test goes here..."- yarn install- yarn buildartifacts:- dist/**
- step:name: Deploy to developmentdeployment: Developmentscript:- echo "Deploying to test environment"- pipe: atlassian/azure-storage-deploy:2.2.1variables:SOURCE: 'dist/'DESTINATION_STORAGE_ACCOUNT_NAME: $DESTINATION_STORAGE_ACCOUNT_NAMEDESTINATION_SAS_TOKEN: $DESTINATION_SAS_TOKENDESTINATION_CONTAINER_NAME: $DESTINATION_CONTAINER_NAMEOVERWRITE: 'true' # Optional.DEBUG: 'true' # Optional.
With this version of the pipe you may upload only file or a directory, not the content of a directory.Update: you could try to cd to needed directory and then provide a dot as source:
- cd dist - pipe: atlassian/azure-storage-deploy:2.2.1 variables: SOURCE: '.'
Please, provide a feedback if this helped you.Regards, Igor
unfortunetly this then gets the whole content of my repo to the azure storage than only the content of dist. on my azure storage I have a static website for my react front end. I need in there the content of the dist do you have any other suggestion how to achieve this?
I will investigate this, add this as feature request to the pipe, and notify you when this feature will become available.
Does this support extra args? I would like to use the azcopy --delete-destination flag
It looks like you're new here. Sign in or register to get started.