我正在尝试在一个文件规范中传递两个${key}值。有没有办法通过jfrog cli命令调用这两个${key}值?
例如,我已经尝试了以下命令
sh "./jfrog rt s --spec compare.spec --spec-vars currentBuild=${currentBuild.number};previousBuild=${currentBuild.previousBuild.number}"但是它只显示一个值的输出。
发布于 2019-01-09 04:45:04
该命令缺少spec-vars两边的引号。因此,例如,使用如下规范文件
{
"files": [
{
"pattern": "${pat}/",
"target": "${tgt}/"
}
]
}我需要以如下方式运行该命令
jfrog rt dl --spec otherspec --spec-vars "pat=generic-local;tgt=local"确保我将文件从"generic-local“存储库下载到名为"local”的文件夹中。
如果使用JFROG_CLI_LOG_LEVEL=DEBUG执行该命令,则输出将显示您提供的等级库文件和解析的文件:
$ JFROG_CLI_LOG_LEVEL=DEBUG jfrog rt dl --spec otherspec --spec-vars "pat=generic-local;tgt=local"
[Debug] Replacing variables in the provided File Spec:
{
"files": [
{
"pattern": "${pat}/",
"target": "${tgt}/"
}
]
}
[Debug] Replacing '${pat}' with 'generic-local'
[Debug] Replacing '${tgt}' with 'local'
[Debug] The reformatted File Spec is:
{
"files": [
{
"pattern": "generic-local/",
"target": "local/"
}
]
}
[Info] Searching items to download...https://stackoverflow.com/questions/52149919
复制相似问题