[英]Azure Devops - Clean Destination Directory Before Deployment
I have a Azure Devops build step like so:我有一个 Azure Devops 构建步骤,如下所示:
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\ArtifactsToBePublished'
The publish step just deploys the app on top of what is currently in the directory, but in the meantime the entire app structure may have changed.发布步骤只是将应用程序部署在当前目录中的内容之上,但与此同时,整个应用程序结构可能已经改变。 Is there any way to clear the destination directory before the publish step takes place?
有没有办法在发布步骤发生之前清除目标目录?
PublishBuildArtifact
doesn't do what you think it does. PublishBuildArtifact
不会做你认为它做的事情。 All it does it takes the files in the path you specify, uploads them to Azure DevOps, and attaches them to the build so that they can be downloaded and consumed in other pipelines .它所做的一切就是获取您指定路径中的文件,将它们上传到 Azure DevOps,并将它们附加到构建中,以便可以在其他管道中下载和使用它们。
So basically the premise of your question is faulty, as there is nothing to clear.所以基本上你的问题的前提是错误的,因为没有什么需要澄清的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.