我正在尝试用JFROG构建一个GO项目。我已经安装了jfrod并设置了一个示例go项目。
当我运行jfrog构建时,依赖项将被下载,但不会被上传到j蛙构件工厂。如果我在配置上出了问题,请告诉我。
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/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 go build **
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工件。
cat go.mod
module github.com/you/hello
require rsc.io/quote v1.5.2没有将rsc.io/和rsc.io/samplerv1.3.0的依赖项发送到工件。如果我使用go,模块github.com/you/hello将被上传到artifactory。实际上,我也希望上传每一个依赖的go-mod文件。
发布于 2022-10-13 08:37:50
您缺少了jf go-publish <version>命令,在您克隆的示例项目中也提到了这个命令。jf go build命令只运行go build来构建模块,它不会将其发布到Artifactory。在您的终端中运行以下命令以查看这些命令的使用帮助:
jf help go
jf help go-publish请注意,示例项目已经有4年的历史了,有些过时了.最好参考正式的JFrog文档,特别是:
https://stackoverflow.com/questions/74051160
复制相似问题