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
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.
The primary error seems to be:
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 ())
I would try running go get -v google.golang.org/appengine
and curl -v https://google.golang.org/appengine?go-get=1
from within your CI environment to see what they show.
This is what I get for go get -v google.golang.org/appengine
:
$ go get -v google.golang.org/appengine
Fetching https://google.golang.org/appengine?go-get=1
Parsing meta tags from https://google.golang.org/appengine?go-get=1 (status code 200)
get "google.golang.org/appengine": found meta tag
get.metaImport{Prefix:"google.golang.org/appengine",
VCS:"git", RepoRoot:"https://github.com/golang/appengine"}
at https://google.golang.org/appengine?go-get=1
Perhaps you have some network connectivity, firewall, or HTTP proxy issue.