Hi,
I am trying to setup a ci/cd for our frontend react code which needs to build and deploy the frontend to azure storage. I am using Azure Storage Deploy pipe but I can mange to only copy the whole directory over instead of the files inside or only one file / folder from within the main dir. How can I set the YMAL correctly to only coy the files and folders of my main folder over?
Hello @sschroders
and thank you for reaching out to Community!
You can configure the path that will be deployed by the atlassian/azure-storage-deploy pipe by setting the SOURCE variable in the pipe definition on your YML file.
For example, to deploy a folder named main inside the current directory, you can configure the pipe as follows:
script:
- pipe: atlassian/azure-storage-deploy:2.2.1
variables:
SOURCE: 'main'
DESTINATION_STORAGE_ACCOUNT_NAME: 'https://mystorageaccount.blob.core.windows.net'
DESTINATION_SAS_TOKEN: $AZURE_STORAGE_SAS_TOKEN
DESTINATION_CONTAINER_NAME: 'my-container'
SOURCE accepts both directory or filename, so to deploy a single file named my-file.txt, the pipe definition would be:
script:
- pipe: atlassian/azure-storage-deploy:2.2.1
variables:
SOURCE: 'my-file.txt'
DESTINATION_STORAGE_ACCOUNT_NAME: 'https://mystorageaccount.blob.core.windows.net'
DESTINATION_SAS_TOKEN: $AZURE_STORAGE_SAS_TOKEN
DESTINATION_CONTAINER_NAME: 'my-container'
You can find additional examples and descriptions of each of the pipe's variables on it's official documentation page :
Hope that helps! Let us know in case you have any questions.
Thank you, @sschroders !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.