go build
is great for developer builds, CI needs more control of the build process.
Calls make all
and pipes the output to a sed script that transforms the output that TeamCity can understand in the form of service messages
Builds all the packages in the cmd
directory, and runs all tests on all packages, generating a cover profile for each package. The cover profiles are then collected into a single cover profile to be analayzed by go tool cover
. Finally, output of go tool cover
is packaged into a zip file.
Transforms output from go test -v
(and the one info
line that the Makefile adds before running each package's tests) into TeamCity service messages.
It also publishes the coverage.zip
that the Makefile generates as an artifact so that TeamCity will display the code coverage report on the coverage tab for the build.