jf-rt-go-build没有将依赖项上传到jfrog-artifactort



我正在尝试使用JFROG CLI构建一个GO项目。我已经安装了jfrod-cli,并设置了一个示例go项目。

当我运行jf-rt-go-build时,依赖项被下载,但没有上传到jfrog-artifactory。如果我在配置上出现任何错误,请告诉我。

git克隆https://github.com/jbaruch/artifactory-go-example.git

我已经配置了jfrog-cli,配置如下:-

jf配置显示

Server ID:                      demo-go-repo-local
JFrog platform URL:             http://172.30.149.181:8081/
Artifactory URL:                http://172.30.149.181:8081/artifactory/
Distribution URL:               http://172.30.149.181:8081/distribution/
Xray URL:                       http://172.30.149.181:8081/xray/
Mission Control URL:            http://172.30.149.181:8081/mc/
Pipelines URL:                  http://172.30.149.181:8081/pipelines/
User:                           admin
Password:                       ***
Default:                        true

cat/root/dir/artifactory go example/.jfrog/projects/go.yaml

version: 1
type: go
resolver:
repo: demo-go-repo-remote
serverId: demo-go-repo-local
deployer:
repo: demo-go-repo-local
serverId: demo-go-repo-local

**jf-rt开始构建**

11:35:42 [🟠Warn] You are using a deprecated syntax of the command.
The new command syntax is quite similar to the syntax used by the native go client.
All you need to do is to add 'jf' as a prefix to the command.
For example:
$ jf go ...
The --build-name and --build-number options are still supported.
11:35:42 [🔵Info] Using go: go version go1.19.2 linux/amd64
go: downloading rsc.io/quote v1.5.2
go: downloading rsc.io/sampler v1.3.0
go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c

在上面的日志中也没有上传到jfrog artifactory。

cat go.mod
module github.com/you/hello
require rsc.io/quote v1.5.2

依赖项rsc.io/quote和rsc.io/sampler v1.3.0没有发送到artifactory。如果我使用go-publish,那么模块github.com/you/hello将被上传到artifactory。事实上,我正在寻找上传每个依赖在go-mod文件也。

您缺少jf go-publish <version>命令,您克隆的示例项目中也提到了该命令。jf go build命令只运行go build来构建模块,而不会将其发布到Artifactory。在您的终端中运行以下命令以查看这些命令的使用帮助:

jf help go
jf help go-publish

请注意,这个示例项目已经有4年的历史了,有些过时了。最好参考JFrog的官方文档,特别是:

  • 快速入门指南:Go
  • 工件作为Go注册表
  • 用于JFrog Artifactory的CLI-构建Go包

最新更新