简体   繁体   English

Jenkins Azure Blob 存储插件将构建文件夹的内容而不是构建文件夹复制到 $web azure blob 静态容器

[英]Jenkins Azure Blob Storage plugin to copy the contents of Build folder and not build folder to $web azure blob static cotainer

We are using Jenkins Azure Blob plugin to deploy into Azure Blob Storage and have to use $web hosting feature in Azure.what happens is while mentioning the folder like build/* , this is copying the entire build folder into $web container instead of the files inside the build folder.我们正在使用 Jenkins Azure Blob 插件部署到 Azure Blob 存储中,并且必须在 Azure 中使用 $web 托管功能。发生的事情是在提到像 build/* 这样的文件夹时,这是将整个构建文件夹复制到 $web 容器中而不是build 文件夹中的文件。 As per the Azure static web hosting, the document index file will be only pointed to index.html under $web ie $web/index.html, but in this case it is coming as $web/build/index.html which we don't want.根据 Azure 静态 Web 托管,文档索引文件将仅指向 $web 下的 index.html,即 $web/index.html,但在这种情况下,它以 $web/build/index.html 的形式出现,我们不这样做不想。 This build folder can't be configure in the Azure Web static hosting and it has to be in the root as there are couple of files which comes as relative path automatically after build.这个构建文件夹不能在 Azure Web 静态托管中配置,它必须在根目录中,因为有几个文件在构建后自动作为相对路径出现。 https://azure.microsoft.com/en-us/blog/azure-storage-static-web-hosting-public-preview/ https://docs.microsoft.com/en-us/azure/storage/common/storage-java-jenkins-continuous-integration-solution https://azure.microsoft.com/en-us/blog/azure-storage-static-web-hosting-public-preview/ https://docs.microsoft.com/en-us/azure/storage/common/存储-java-jenkins-continuous-integration-solution

Please can someone check and responds..请有人检查并回复..

Thanks谢谢

Just use the dir command to run the Azure Storage inside your root folder, and remove the folder from the parameter:只需使用 dir 命令在根文件夹中运行 Azure 存储,然后从参数中删除该文件夹:

dir('build'){
   azureUpload blobProperties: … filesPath: '**/'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM