YAML管道中版本的多代理工作
因此,我有一个YAML管道,该管道有一个阵列存储在Bash中的版本,可以说 arrayversions =(3.0.1 3.0.2 ....)
。
现在,我想设置将这些版本分配为一个单个 job 在yaml管道中,然后在多代理范式中运行它们。
上下文 - 我已经设置了在数组上迭代并运行的管道,但是,由于它依次运行,因此非常慢。因此,我尝试了BASH中的多线程并行编程,但没有解决。在理想的解决方案中,我想将所有版本分开,并将它们作为新的
jobs:
# get all the versions
# split up each version into 1 single job and run the jobs in parallel
job: 3.0.1
...
job: 3.0.2
...
有什么办法可以设置它?
So, I have a yaml pipeline that has an array storing a set of versions in bash, let's sayarrayVersions=(3.0.1 3.0.2 ....)
.
Now, I want to set up the pipeline that splits each of these versions in one single job in the yaml pipeline, then run them in multi-agent paradigm.
CONTEXT -
I have set up the pipeline that iterates over the array and runs, however, it is very slow since it runs sequentially. So, I tried multithreaded parallel programming in bash, but it did not work out. In ideal solution, I am thinking to split up all the versions and run them as a new job
in the pipeline. It would be something like this:
jobs:
# get all the versions
# split up each version into 1 single job and run the jobs in parallel
job: 3.0.1
...
job: 3.0.2
...
Is there any way I can set it up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用模板并从
作业
部分调用它?以下是一个示例:docs: Microsoft技术文档|模板类型&用法
另请参阅: loops and Arays and Arrays in Azure DevOps Pipelines
Have you tried using a template and calling it from the
jobs
section? Here's an example:Docs: Microsoft technical documentation|Template types & usage
Also see: Loops and arrays in Azure Devops Pipelines