make XC_OS=linux XC_ARCH=amd64 when running on macos puts its binaries in ${GOPATH}/bin/linux_amd64/consul and not ${GOPATH}/bin/consul
This makes the build pull the binary from the right location.
1. Prints the $version that you are passing through to the docker
container
2. Prints the CONSUL_VERSION that is used in the UI v2 footer
3. Additionally added a `mkdir -p` so so `make ui-docker` runs with a
clean exit if run in isolation
We verify the git remote/url with whoever is running (in addition to other automated checks)
We also now run consul agent -dev, check is first 25 lines of output, consul info output and that consul leave works.
Improvements:
- More modular
- Building within docker doesn’t use volumes so can be run on a remote docker host
- Build containers include only minimal context so they only rarely need to be rebuilt and most of the time can be used from the cache.
- 3 build containers instead of 1. One based off of the upstream golang containers for building go stuff with all our required GOTOOLS installed. One like the old container based off ubuntu bionic for building the old UI (didn’t bother creating a much better container as this shouldn’t be needed once we completely remove the legacy UI). One for building the new UI. Its alpine based with all the node, ember, yarn stuff installed.
- Top level makefile has the ability to do a container based build without running make dist
- Can build for arbitrary platforms at the top level using: make consul-docker XC_OS=… XC_ARCH=…
- overridable functionality to allow for customizations to the enterprise build (like to generate multiple binaries)
- unified how we compile our go. always use gox even for dev-builds or rather always use the tooling around our scripts which will make sure things get copied to the correct places throughout the filesystem.