fabric8-services / fabric8-wit

wit stands for Work Item Tracker
http://devdoc.almighty.io/
Apache License 2.0
45 stars 86 forks source link

Use only go1.9 for all builds #2385

Closed jarifibrahim closed 5 years ago

jarifibrahim commented 5 years ago

The environment variable set in the cico script doesn't get reflected in the docker build.. command in the Makefile.

Creating build directory 
mkdir -p /tmp/fabric8-wit-build
Building docker image fabric8-wit
docker build --build-arg USE_GO_VERSION_FROM_WEBSITE= -t fabric8-wit -f /root/payload/Dockerfile.builder /root/payload
Sending build context to Docker daemon 557.1 kB
Sending build context to Docker daemon 4.456 MB
Sending build context to Docker daemon 9.417 MB

The USE_GO_VERSION_FROM_WEBSITE was previously set

export USE_GO_VERSION_FROM_WEBSITE=1

However, it didn't help.

sbose78 commented 5 years ago
Building docker image fabric8-wit
docker build --build-arg -t fabric8-wit -f /root/payload/Dockerfile.builder /root/payload
"docker build" requires exactly 1 argument(s).
See 'docker build --help'.
sbose78 commented 5 years ago

I think the way we set env var in the cico script and then expect it to work inside the makefile is fundamentally incorrect.

We would need to find an alternative to that.

jarifibrahim commented 5 years ago
+ make docker-test-migration
docker exec -t  "jenkins-devtools-fabric8-wit-4528" bash -ec 'export F8_POSTGRES_HOST=172.17.0.3; make test-migration'
INFO: go version go1.9.4 linux/amd64

INFO: GOARCH=amd64 GOBIN= GOEXE= GOHOSTARCH=amd64 GOHOSTOS=linux GOOS=linux GOPATH=/tmp/go GORACE= GOROOT=/usr/local/go GOTOOLDIR=/usr/local/go/pkg/tool/linux_amd64 GCCGO=gccgo CC=gcc GOGCCFLAGS=-fPIC -m64 -pthread -fmessage-length=0 CXX=g++ CGO_ENABLED=1 CGO_CFLAGS=-g -O2 CGO_CPPFLAGS= CGO_CXXFLAGS=-g -O2 CGO_FFLAGS=-g -O2 CGO_LDFLAGS=-g -O2 PKG_CONFIG=pkg-config

F8_RESOURCE_DATABASE=1 F8_LOG_LEVEL=error go test -vet off  github.com/fabric8-services/fabric8-wit/migration

?       github.com/fabric8-services/fabric8-wit [no test files]

Check that no unexpected left-over spaces exist after running tests:

ERROR:  relation "spaces" does not exist

LINE 1: SELECT id, name, description FROM spaces;

We need to remove the vet off flag from go test.