-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Plugin: 0.3.13
Jenkins Version: 2.150.3
-
-
0.3.14 (planned)
Not sure if this is a bug, but the docs might be confusing me. I'm trying a simple test to see if I can download specific files directly from a specific location in a storage account. I created a storage account and manually uploaded a foo.txt file to an "artifacts" File Share under a subfolder called Secrets. I uploaded a copy off another in a different subfolder (Azure-Storage-Upload) of the same File Share
The pipeline syntax step suggests that downloading from the File Share is possible and that files can be downloaded using ant fileset syntax (I attached a screenshot of the syntax help)
I created a simple pipeline:
pipeline{ agent any stages{ stage ('Do Something'){ steps{ echo 'download' azureDownload downloadType: 'share', fileShare: 'artifacts', includeFilesPattern: 'Secrets/foo.txt', storageCredentialId: 'jenkins-devops-test-02' } } } }
No matter the ant syntax I've tried, I cannot download the specific foo.txt from the "Secrets" subfolder. I've tried all sorts of combinations such as: /Secrets/.txt, **/Secrets/*, Secrets/foo.txt, Secrets\foo.txt, etc., etc., etc.
[Pipeline] echo download [Pipeline] azureDownload MicrosoftAzureStorage - Downloading files from Azure storage MicrosoftAzureStorage - Need to be downloaded file count = 0 MicrosoftAzureStorage - No file was downloaded from Azure storage. Verify that files exist with specified blob or share. [Pipeline] }
However, when I use just "foo.txt" in includeFilesPattern value, both foo.txt files are downloaded from the storage account's File Share. Given there's not a foo.txt in the root of the "artifacts" File Share this should not have occurred.
[Pipeline] echo download [Pipeline] azureDownload MicrosoftAzureStorage - Downloading files from Azure storage Downloading file:https://ouraccount.file.core.windows.net/artifacts/Azure-Storage-Upload/foo.txt MicrosoftAzureStorage - Need to be downloaded file count = 2 Downloading file:https://ouraccount.file.core.windows.net/artifacts/Secrets/foo.txt blob foo.txt is downloaded to D:\jenkins\home\jobs\Azure-Pipeline-Test\workspace in 00:00:00.197 (HH:mm:ss.S) blob foo.txt is downloaded to D:\jenkins\home\jobs\Azure-Pipeline-Test\workspace in 00:00:00.444 (HH:mm:ss.S) MicrosoftAzureStorage - Downloaded file count = 2 [Pipeline] }
It appears that the plugin isn't using ant like syntax when it comes to downloading files in a tree in a storage account's "File Share". While I could make something work for my needs, the docs might need to be adjusted to avoid confusion if the ability to pull specific, manually uploaded files from a given subdir under a File Share will not be supported. If it is, or will be possible, any guidance would be appreciated. It could be a pretty handy feature!