Geo*_*off 0 artifactory jfrog-cli
This is what my setup looks like:
JFrog CLI 1.26.2
I have a local directory with the following items:
My spec looks like so this:
{
"files": [
{
"pattern": "myartifact/*",
"regexp": "false",
"target": "testrepo-release/testbuilds/",
"recursive": "true",
"flat": "false",
"explode": "false"
}
]
}
Run Code Online (Sandbox Code Playgroud)
Then I run build-add-dependencies:
shell>jfrog rt build-add-dependencies --spec=spec myartifact 1
[Info] Running Build Add Dependencies command...
[Info] Adding dependency: myartifact/1.0.0/myartifact-1.0.0-1.txt
{
"status": "success",
"totals": {
"success": 1,
"failure": 0
}
}
Run Code Online (Sandbox Code Playgroud)
Finally I run build publish:
shell>jfrog rt build-publish --url=https://server.com/artifactory/ --user=user --password=password --build-url=https://fake myartifact 1
[Info] Deploying build info...
[Info] Build info successfully deployed. Browse it in Artifactory under https://server.com/artifactory/webapp/builds/myartifact/1
Run Code Online (Sandbox Code Playgroud)
I can't figure out why there is nothing (builds or artifacts) at the target testrepo-release/testbuilds/
Thanks for your help!
build-add-dependencies命令收集位于本地文件系统上的文件,并将它们作为依赖项添加到build-info中。它不会将文件上传到Artifactory。为了上传文件,您首先需要使用upload命令将文件上传到Artifactory。您可以使用相同的文件格式。
一旦文件被上传,您就可以使用build-add-depedencies命令将文件作为依赖关系添加到构建中。
请注意,build-add-depedencies从本地文件系统而不是从Artifactory收集文件。未来的JFrog CLI版本可能会增加从Artifactory收集文件并将其作为依赖项添加到内部版本的功能(添加此答案时最新的JFrog版本为1.27.0)。
其他注意事项:upload和download命令都接受两个可选标志:--build-name和--build-number。这些标志使命令将上载的文件注册为构建工件,将下载的文件注册为构建依赖项。
归档时间: |
|
查看次数: |
101 次 |
最近记录: |