簡體   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

我們正在使用 Jenkins Azure Blob 插件部署到 Azure Blob 存儲中,並且必須在 Azure 中使用 $web 托管功能。發生的事情是在提到像 build/* 這樣的文件夾時,這是將整個構建文件夾復制到 $web 容器中而不是build 文件夾中的文件。 根據 Azure 靜態 Web 托管,文檔索引文件將僅指向 $web 下的 index.html,即 $web/index.html,但在這種情況下,它以 $web/build/index.html 的形式出現,我們不這樣做不想。 這個構建文件夾不能在 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/存儲-java-jenkins-continuous-integration-solution

請有人檢查並回復..

謝謝

只需使用 dir 命令在根文件夾中運行 Azure 存儲,然后從參數中刪除該文件夾:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM