CodeShip Pro to build Golang services


#1

We are trying to use CodeShip Pro for building Golang services, but are unable to get the containers to load the source code to compile and run.

Any CodeShip Pro users that are building Golang services successfully that can educate us on how to get this up and running?


#2

Most likely you need to resolve the go dependancies. You can do this within the dir (ex: ~/src/github.com/yourorg/yourrepo) and execute go get ./...

Another method is to use go vendoring which is safer as you will get a static version for each dependency that is checked in and not be subject to breaking latest changes. I’ve used https://github.com/kardianos/govendor


#3

True, and since we are pulling from multiple private repos, the approach to key management is tripping us up. We see articles on using oauth, machine keys, TFA tokens, and using filesystem overlays to ephemerally inject personal keys. There doesn’t seem to be a specific approach that is considered best practice for using with CodeShip. Personally, I like the overlay approach, but I don’t know enough about CodeShip internals to know if this approach works for CodeShip.

Regardless of the key management approach, we are also unable to inject a secret into the container. We are trying to inject an encrypted arguments file into the container, but nothing shows up on the container side. Anyone know how to debug that with ‘jet’?