我在 Artifactory 中构建的构建信息 JSON 包含以下内容:
{
"properties": {
"java.vendor": "Oracle Corporation",
"sun.java.launcher": "SUN_STANDARD",
"sun.management.compiler": "HotSpot 64-Bit Tiered Compilers",
"buildInfo.env.CLASSPATH": "",
"os.name": "Linux",
"buildInfo.env.GIT_BRANCH": "origin/my-branch-name",
},
"version": "1.0.1",
"name": "my-project",
"number": "359",
如果我使用项目名称和内部版本号进行搜索,我会得到结果。
items.find({
"@build.name":"my-project",
"@build.number":"359"
}).include("*")
但是,如果我尝试在属性中搜索,我不会。
items.find({
"@build.properties.buildInfo.env.GIT_BRANCH": "origin/my-branch-name"
}).include("*")
如何在这些属性中搜索?即构建的环境变量。