duan0818 2019-07-24 12:29
浏览 53

Gitlab CI和Go模块

I have a Go project and I want write a Gitlab CI file my project but I see error loading module requirements. This is my gitlab CI file:

stages:
  - compile
build:
  stage: compile
  image: golang:1.12
  script:
    - go build -o binary
error :
Running with gitlab-runner 11.8.0 (4745a6f3)
  on Runner #6 e0e0c446
Using Docker executor with image golang:1.12 ...
Pulling docker image golang:1.12 ...
Using docker image sha256:be63d15101cb68aea1841b45201b08a1a486c1a60a029bbf0ddb284ab646b0b7 for golang:1.12 ...
Running on runner-e0e0c446-project-753-concurrent-0 via runner-01.tool.afra.snapp.infra...
Cloning repository...
Cloning into '/builds/Alsopa/echo-training'...
Checking out ab3994cc as develop...
Skipping Git submodules setup
$ go build -o binary
go: finding github.com/labstack/gommon v0.2.9
go: finding github.com/labstack/echo v3.3.10+incompatible
go: finding github.com/go-sql-driver/mysql v1.4.1
go: google.golang.org/appengine@v1.6.1: unrecognized import path "google.golang.org/appengine" (parse https://google.golang.org/appengine?go-get=1: no go-import meta tags ())
go: error loading module requirements
ERROR: Job failed: exit code 1
  • 写回答

2条回答 默认 最新

  • dtwbp26022 2019-07-25 14:40
    关注

    Be sure you upload the last go.sum file. Just before uploading to master for the ci execution run go get, upload to master and run the ci.

    评论

报告相同问题?

悬赏问题

  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助