首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >jfrog构建没有将依赖项上载到jfrog。

jfrog构建没有将依赖项上载到jfrog。
EN

Stack Overflow用户
提问于 2022-10-13 06:10:43
回答 1查看 100关注 0票数 1

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

当我运行jfrog构建时,依赖项将被下载,但不会被上传到j蛙构件工厂。如果我在配置上出了问题,请告诉我。

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

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

jf配置显示

代码语言:javascript
复制
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

代码语言:javascript
复制
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 **

代码语言:javascript
复制
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工件。

代码语言:javascript
复制
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文件。

EN

回答 1

Stack Overflow用户

发布于 2022-10-13 08:37:50

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

代码语言:javascript
复制
jf help go
jf help go-publish

请注意,示例项目已经有4年的历史了,有些过时了.最好参考正式的JFrog文档,特别是:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74051160

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档