Build instructions are broken (Go 1.4 doesn't work)
I just tried to build the runner according to the instructions here: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/development/README.md
The build fails when trying to install the Go linter, as Go version 1.5 is now required.
$ make deps
# Installing dependencies...
go get -u github.com/golang/lint/golint
package github.com/golang/lint/golint
imports github.com/golang/lint
imports go/types: unrecognized import path "go/types"
package github.com/golang/lint/golint
imports github.com/golang/lint
imports golang.org/x/tools/go/gcimporter15
imports golang.org/x/tools/go/gcimporter15
imports golang.org/x/tools/go/gcimporter15: no buildable Go source files in /home/ubuntu/Go/src/golang.org/x/tools/go/gcimporter15
make: *** [deps] Error 1
So I upgraded my Go compiler to version 1.6, and then the make deps
step succeeds.
EDIT: I originally had another problem with the build but I had my Go code in the wrong place. I didn't know that projects always have to be edited within $GOPATH. Ignore the following (preserved in case anyone else runs into this):
$ make build
# Create directory
mkdir -p out/docker
# Building gitlab-runner-helper
gox -osarch=linux/amd64 \
-ldflags "-X main.NAME=gitlab-ci-multi-runner -X main.VERSION=1.3.2~beta.2.g33c1fb8 -X main.REVISION=33c1fb8 -X main.BUILT=2016-07-05T03:26:10+00:00 -X main.BRANCH=hack" \
-output="dockerfiles/build/gitlab-runner-helper" \
./apps/gitlab-runner-helper
Number of parallel builds: 1
--> linux/amd64: _/home/ubuntu/gitlab-ci-multi-runner/apps/gitlab-runner-helper
1 errors occurred:
--> linux/amd64 error: exit status 1
Stderr: main.go:7:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/usr/lib/go/src/github.com/Sirupsen/logrus (from $GOROOT)
/home/ubuntu/Go/src/github.com/Sirupsen/logrus (from $GOPATH)
main.go:8:2: cannot find package "github.com/codegangsta/cli" in any of:
/usr/lib/go/src/github.com/codegangsta/cli (from $GOROOT)
/home/ubuntu/Go/src/github.com/codegangsta/cli (from $GOPATH)
main.go:13:2: cannot find package "gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/helpers" in any of:
/usr/lib/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/helpers (from $GOROOT)
/home/ubuntu/Go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/helpers (from $GOPATH)
main.go:9:2: cannot find package "gitlab.com/gitlab-org/gitlab-ci-multi-runner/common" in any of:
/usr/lib/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common (from $GOROOT)
/home/ubuntu/Go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common (from $GOPATH)
main.go:10:2: cannot find package "gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/cli" in any of:
/usr/lib/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/cli (from $GOROOT)
/home/ubuntu/Go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/cli (from $GOPATH)
main.go:11:2: cannot find package "gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/formatter" in any of:
/usr/lib/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/formatter (from $GOROOT)
/home/ubuntu/Go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/helpers/formatter (from $GOPATH)
make: *** [out/docker/prebuilt-x86_64.tar.gz] Error 1
I tried manually go get
ing these packages, and that got rid of these errors, but introduced conflicts between the global versions of the package and the vendored one. I haven't managed to fix this yet (by telling it to use the vendored packages I assume), so any help would be appreciated. Either way, the build instructions also need updating.