docker - ci/cd中断go get测试

标签 docker go continuous-integration gitlab

我正在尝试预构建docker映像,以便我的ci / cd管道运行得更快,并且go出现了问题

我曾尝试过重置缓存和更改环境变量,但是没有人为我工作

Fetching https://git.dar.kz/forte-market/domain?go-get=1
Fetching https://gopkg.in/olivere/elastic.v5?go-get=1
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/xanzy/go-gitlab v0.20.1
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding github.com/tealeg/xlsx v1.0.3
go: finding github.com/gorilla/mux v1.7.3
go: finding github.com/prometheus/client_golang v1.1.0
go: finding github.com/satori/go.uuid v1.2.0
Parsing meta tags from https://gopkg.in/olivere/elastic.v5?go-get=1 (status code 200)
get "gopkg.in/olivere/elastic.v5": found meta tag get.metaImport{Prefix:"gopkg.in/olivere/elastic.v5", VCS:"git", RepoRoot:"https://gopkg.in/olivere/elastic.v5"} at https://gopkg.in/olivere/elastic.v5?go-get=1
go: finding gopkg.in/olivere/elastic.v5 v5.0.82
Parsing meta tags from https://git.dar.kz/forte-market/domain?go-get=1 (status code 200)
get "git.dar.kz/forte-market/domain": found meta tag get.metaImport{Prefix:"git.dar.kz/forte-market/domain", VCS:"git", RepoRoot:"https://git.dar.kz/forte-market/domain.git"} at https://git.dar.kz/forte-market/domain?go-get=1
go: finding git.dar.kz/forte-market/domain v1.2.0
go: git.dar.kz/forte-market/domain@v1.2.0: unknown revision v1.2.0
go: finding github.com/go-kit/kit v0.9.0
go: finding github.com/djumanoff/amqp v1.0.4
Fetching https://git.dar.kz/forte-market/acl?go-get=1
Parsing meta tags from https://git.dar.kz/forte-market/acl?go-get=1 (status code 200)
get "git.dar.kz/forte-market/acl": found meta tag get.metaImport{Prefix:"git.dar.kz/forte-market/acl", VCS:"git", RepoRoot:"https://git.dar.kz/forte-market/acl.git"} at https://git.dar.kz/forte-market/acl?go-get=1
go: finding git.dar.kz/forte-market/acl v1.0.4
go: finding github.com/sony/sonyflake v1.0.0
go: git.dar.kz/forte-market/acl@v1.0.4: unknown revision v1.0.4
go: finding github.com/caarlos0/env v3.5.0+incompatible
go: finding github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6
go: finding github.com/lestrrat-go/libxml2 v0.0.0-20190724003929-faf2a4a99869
go: error loading module requirements
ERROR: Job failed: exit code 1

最佳答案

go get找不到某些软件包:

go: git.dar.kz/forte-market/acl@v1.0.4: unknown revision v1.0.4
go: git.dar.kz/forte-market/domain@v1.2.0: unknown revision v1.2.0

您需要确保您的配置项可以访问这些。

如果您使用的是go 1.13,则go get会尝试首先从proxy.golang.org加载这些文件,然后再尝试“旧方法”。您可以在此处了解更多信息:https://golang.org/doc/go1.13#tools

关于docker - ci/cd中断go get测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57854451/

相关文章:

docker - docker-compose up后清空卷文件夹

go - 如何有效地计算文件的校验和

go - 使用 ldflags 设置 Go 变量与 vendor 文件夹冲突

amazon-web-services - 将现有 CodePipeline/CodeBuild 项目导出到 Cloudformation

java - 在 docker 容器内使用 headless chrome 运行 gauge java 规范

node.js - nodejs dockerized应用无法连接到mariadb dockerized数据库

postgresql - Docker-compose无法连接到Docker postgres容器

mysql - GO - 将 mysql json 解析为字符串数组

docker - 在Jenkins容器中构建docker镜像

c# - 使用 bittorrent 协议(protocol)分发夜间和 CI 构建