[英]Automatically deploying .whl artifacts from Azure DevOps feed to Synapse spark pools
I want to automatically deploy artifacts (custom python packages / .whl files) from the Azure DevOps artifact feed to a Synapse spark pool.我想将来自 Azure DevOps 工件源的工件(自定义 python 包/.whl 文件)自动部署到 Synapse 火花池。
Currently I have to manually:目前我必须手动:
I have so far not found any option to do this as part of a release/pipeline in Azure DevOps or via the AzureCLI and also have not found any documentation on it.到目前为止,我还没有找到任何选项可以作为 Azure DevOps 中的发布/管道的一部分或通过 AzureCLI 执行此操作,也没有找到任何文档。 I was wondering whether anyone has found a solution concerning automating this step?
我想知道是否有人找到了有关自动化此步骤的解决方案? It is quite cumbersome to have to do it manually.
必须手动完成非常麻烦。
PS: I already asked this question on the MS forum , but have gotten no official answer yet. PS:我已经在MS论坛上问过这个问题,但还没有得到官方的答复。
I managed to update the pool spark packages by using both the Download Packages
task and the Azure CLI
task in the release pipeline on devops.我设法通过在 devops 上的发布管道中使用
Download Packages
任务和Azure CLI
任务来更新池火花包。
First use the Download Packages
task to download your feed to the pipeline $(System.DefaultWorkingDirectory)
then use the Azure CLI to update the sparkpool.首先使用
Download Packages
任务将源下载到管道$(System.DefaultWorkingDirectory)
,然后使用 Azure CLI 更新 sparkpool。
In the Azure CLI task write in the inline command field the two following lines.在 Azure CLI 任务中,在内联命令字段中写入以下两行。 Use the
$(System.DefaultWorkingDirectory)
as working directory, also I recommand to check the Use global Azure CLI configuration
checkbox.使用
$(System.DefaultWorkingDirectory)
作为工作目录,我还建议检查Use global Azure CLI configuration
复选框。
First command to upload your .whl to the workspace.将 .whl 上传到工作区的第一个命令。 Here is the doc
这是文档
az synapse workspace-package upload --workspace-name yourworkspace --package yourpackage.whl
Then upload it to the pool spark.然后将其上传到池火花。 Here is the doc .
这是文档。
az synapse spark pool update --name yourpoolspark --workspace-name yourworkspace --resource-group yourresourcegroupe --package-action Add --package yourpackage.whl
Those two commands will add the package to your workspace and then upload it to the poolspark.这两个命令会将包添加到您的工作区,然后将其上传到 poolspark。
Hope it will help you !希望它会帮助你!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.