For now we switched to hardcode the version and things keep working. Here is the PR to reintroduce usage of the environment variable: https://github.com/elastic/beats/pull/10589 I played around with some different environment vars but no luck yet.
The error we get is:
Setting environment variables from .travis.yml
$ export GOX_FLAGS="-arch amd64"
$ export DOCKER_COMPOSE_VERSION=1.21.0
$ export GO_VERSION="$(cat .go-version)"
$ export TRAVIS_MINIKUBE_VERSION=v0.25.2
$ export TARGETS="check"
23.14s$ travis_setup_go $GO_VERSION github.com/elastic/beats
gimme: version specifier '$GO_VERSION' unknown
error: GIMME_GO_VERSION not recognized as valid
got: $GO_VERSION
Failed to run gimme
The command "travis_setup_go $GO_VERSION github.com/elastic/beats" failed and exited with 86 during .
@ruflin Thanks for bringing this up! This usage with defining GO_VERSION is new for me, but I would assume it could work. Please note that any value given to the go: key will be escaped, which is (I assume) why the error you’ve posted is happening.
Do you think a solution like this could work for you?
It has the unfortunate quality of running travis_setup_go twice, so maybe it would be better (and I would prefer) for the default setup step to be literally:
Hi @meatballhat Thanks a lot for the details. We used the config with the GO_VERSION for at least the last 12 months and worked perfectly.
For us it’s less important which variable it is then that it doesn’t change. Having GO_VERSION not working anymore meant all PR’s to release branches went red so we had to fix all them.