brent-robinson / posh-acme-azure-example

Example using the Posh-ACME PowerShell module to orchestrate TLS certificate issuance using ACME in Azure with Azure DevOps
https://medium.com/@brentrobinson5/automating-certificate-management-with-azure-and-lets-encrypt-fee6729e2b78
MIT License
30 stars 25 forks source link

Remove pa sync folder to start with a clean state. #3

Open hhhuut opened 3 years ago

hhhuut commented 3 years ago

Hi there,

I noticed that New-Item can throw errors when the "pa" folder already exists, which is counter-productive in a pipeline.

Additionally, if I remove files/folders from the BLOB container, a local pipeline agent might still have an old version and azcopy sync does not clean up files that aren't in the source directory anymore, so the pipeline agent can still have old files that will be synced back to the BLOB again.