1
votes

I have a Release Pipeline setup to extract my build artifact and then I use the RegEx Find & Replace task to update a few configuration files on my static website before uploading via AzureBlob File Copy task.

What I have currently works. However I have to use the full source path to the "wwwroot" folder in order to for the correct files to be uploaded.

My concern is that my builds may change the directory structure that gets dropped as a build artifact which will break my release tasks.

I've tried to use various wildcards for the source path such as:

**/wwwroot/*
*/*wwwroot/*

And many other variations to no avail.

I read in some of the docs that wildcards won't work for directory paths in this task but was hoping there was a way to work around this as I have long term concerns about the path changing over time. I looked at a few other tasks in the marketplace but nothing seems to fit the bill and I couldn't find any definitive guidance on the matter. Any suggestions?

enter image description here

1

1 Answers

0
votes

1.You can use $(System.DefaultWorkingDirectory)/**/wwwroot/*.*(or .json,.xml...) in Source input.

(If the wwwroot folder doesn't have subfolders and all files within that folder can match format *.*)

2.Otherwise I suggest you archive the wwwroot folder first before uploading it:

enter image description here

enter image description here

Use $(System.DefaultWorkingDirectory) to get working directory and then use full path(not recommend using * here) to archive the specific wwwroot folder. Then upload the zipped folder which contains all content of your wwwroot folder.