1

我正在尝试从 Azure DevOps 管道运行 X 射线扫描,但即使设置了所有内容,我也得到了

Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined

我有一个管道负责在工件上上传一个 nuget 包。这部分工作正常,我可以打包它并将其发布到我的存储库的工件上,没有问题。然后,在同一个版本中,我尝试使用相同的工件端点运行 X 射线扫描。

配置扫描任务时出现不同的错误。首先它说构建不存在,所以我不得不在人工方面声明它,然后它说没有这个名称的构建被索引所以我在索引设置中添加了构建,然后最后一条错误消息告诉我没有手表的存在让我认为问题出在 X 射线方面。

(绿色任务正在运行,红色任务失败) 管道

在 Xray 方面,构建被索引(错误消息消失),我有几个手表,明确指定构建或所有构建。每个都至少有一个策略,并且如屏幕截图所示启用。这就是为什么我不明白为什么它找不到任何匹配的手表,因为所有版本都链接到手表

手表

确切的消息如下

C:\hostedtoolcache\windows\jfrog\1.23.1\x64\jfrog.exe rt bs Lovely-Library-CI Lovely-Library-CI-20190505.1 --url="https://bobbob601.jfrog.io/bobbob601/" --user=*** --password=***
========================== Starting Command Output ===========================
##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\e9fb9321-84e7-4d6b-9674-8e018729a51d.cmd""
The CLI commands require the Artifactory URL and authentication details
Configuring JFrog CLI with these parameters now will save you having to include them as command options.
You can also configure these parameters later using the 'config' command.
[Info] Triggered Xray build scan... The scan may take a few minutes.
[Info] Xray scan completed.
Configure now? (y/n): {
[Error] Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined.
  "summary": {
    "total_alerts": 0,
    "fail_build": true,
    "message": "Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined.",
    "more_details_url": ""
  },
  "alerts": [],
  "licenses": []
}

问题可能来自哪里或我缺少什么的任何想法?我三重检查了文档。尝试使用 CLI 手动调用 xray。仍然是同样的错误

多谢

4

1 回答 1

8

感谢 JFrog 的支持,我得到了未记录的答案。

您至少有一项政策,请选中“构建失败”选项。如果它们只是审核策略,那么您会收到此随机消息。

所以 Xray's Watches -> -> Settings -> Policy (edit) -> check Fail on Build

于 2019-05-06T20:24:31.377 回答