Hey guys,
Alright I’m running into an issue ONLY on my build machine and I can’t understand why.
so I have a Library that exposes Build Variable (such as build date) and that I’m compiling like this:
cd $GOPATH/src/github.com/tom/my_project
go build -v -ldflags '-X github.com/tom/my_project/vendor/github.com/tom/my_lib_path.BuildDate=2016-11-08T12:31:22 -X main.Test=QWERTYUI' -o ~/my_project main.go
This works pretty well EXCEPT on my jenkins box which is where I build my projects… On the Jenkins machine Test
is properly set up but BuildDate
is empty. I can’t understand why and it’s driving me crazy. Anyone has an idea of what could be going on or a better way to do this?
Running the latest version of go, and did the exact same go install and workspace setup on a ubuntu 14.04 (which is working as expected). My guest at this point is jenkins installation change something on at the OS level but I can’t figure out what it could be.
The jenkins box is running Ubuntu 12.04.5 LTS
and jenkins version is 1.656