小编AK1*_*123的帖子

一个构建管道是否可以将值作为参数发送到它在 Azure DevOps 中触发的下一个管道

我有一个构建管道,假设 A - 在文件夹内存储一个文件(该文件具有在该构建管道中设置的变量值)。此管道 A 触发另一个管道 B,该管道 B 使用发布工件任务将该文件夹发布为工件。但文件夹名称是动态的,因为它是从管道 A 中的该文件中获取的。我需要在触发它时将具有该变量值的文件从管道 A 传递到管道 B。有没有办法在 Azure DevOps 中执行此操作,而不使用 yaml 管道?

我有一组使用经典模式设置的复杂管道,将它们全部转换为 yaml 需要很长时间,所以想知道是否有任何解决办法。

variables azure-devops azure-pipelines

12
推荐指数
2
解决办法
1万
查看次数

sort_by on array elements gives error 'Cannot index string with string "key"'

I'm trying to get the status of a code scan by the pull request ID and I'm having trouble getting the value of the status. The json file looks similar to below.

{
"pullRequests": [
{
  "key": "11346",
  "title": "feature/XXX-Validation",
  "branch": "feature/XXX-Validation",
  "base": "develop",
  "status": {
    "qualityGateStatus": "OK",
    "bugs": 0,
    "vulnerabilities": 0,
    "codeSmells": 1
  },
  "analysisDate": "2020-07-27T14:22:36+0000",
  "url": "https://abc/org/_git/repo/pullrequest/11346",
  "target": "develop"
},
{
  "key": "11151",
  "title": "feature/xxx-data",
  "branch": "feature/xxx-data",
  "base": "develop",
  "status": {
    "qualityGateStatus": "OK",
    "bugs": 0,
    "vulnerabilities": 0,
    "codeSmells": …
Run Code Online (Sandbox Code Playgroud)

sorting json jq

7
推荐指数
1
解决办法
3277
查看次数

标签 统计

azure-devops ×1

azure-pipelines ×1

jq ×1

json ×1

sorting ×1

variables ×1