You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.
I've been trying to complete PR #2190 but during the build Travis (and Jenkins) fails to run the executable at $GOPATH/bin/chaincode_example02 inside the chaincode container (I'm running it manually to test when it is in developer mode) it cannot find the file. This seems to be because when the ccenv docker image is made $GOPATH=/opt/gopath but when the container runs in the context of Travis it is /home/travis/gopath.
To add to the confusion when injecting a go env call where it fails it says $GOPATH=/opt/gopath.
Additionally, GOPATH=/opt/gopath $GOPATH/bin/chaincode_example02 still calls /home/travis/gopath/bin/chaincode_example02!
I honestly have no idea what is going on here. Any help would be very much appreciated.
I've deliberately put an non existant path in the chaincode_example02 call so that it fails and I can collect the logs from Travis.
Also, adding the GOBIN=... before Go install allows me to explicitly do the call to the final executable in the last executed step, which works around the issue.
During running the docker container for the BDD tests the output of
go env; GOBIN=/opt/gopath/bin go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && echo $GOPATH && go env && /opt/gopath/bin/FAIL/chaincode_example02
I would expect that go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && $GOPATH/bin/chaincode_example02
would be necessary to build and run the code.
Even though I have currently worked around the issue, I thought it should be tracked.
Figured this out, it seems that docker-compose was doing its own substitution before the command got to the container. Hence the seemingly inconsistent values.
Changing go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && $GOPATH/bin/chaincode_example02 to go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && $$GOPATH/bin/chaincode_example02 (adding an extra dollar sign) escapes docker-compose's substitutions.
Description
I've been trying to complete PR #2190 but during the build Travis (and Jenkins) fails to run the executable at
$GOPATH/bin/chaincode_example02
inside the chaincode container (I'm running it manually to test when it is in developer mode) it cannot find the file. This seems to be because when the ccenv docker image is made$GOPATH=/opt/gopath
but when the container runs in the context of Travis it is/home/travis/gopath
.To add to the confusion when injecting a
go env
call where it fails it says$GOPATH=/opt/gopath
.Additionally,
GOPATH=/opt/gopath $GOPATH/bin/chaincode_example02
still calls/home/travis/gopath/bin/chaincode_example02
!I honestly have no idea what is going on here. Any help would be very much appreciated.
The docker compose file is:
I've deliberately put an non existant path in the
chaincode_example02
call so that it fails and I can collect the logs from Travis.Also, adding the
GOBIN=...
before Go install allows me to explicitly do the call to the final executable in the last executed step, which works around the issue.During running the docker container for the BDD tests the output of
results in:
I would expect that
go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && $GOPATH/bin/chaincode_example02
would be necessary to build and run the code.
Even though I have currently worked around the issue, I thought it should be tracked.
Describe How to Reproduce
Look at https://travis-ci.org/hyperledger/fabric/jobs/146273836 travis run.
The text was updated successfully, but these errors were encountered: