ironcore
ironcore copied to clipboard
create possibility to inject arbitrary build flags for components
variables for go build need to be passed on to docker-build recipes. Following up for a suggestion in PR introducing variables which are meant to be set at build time.
has to be done in go build with -X flag, e.g.
LDFLAGS=${LDFLAGS} -X github.com/ironcore-dev/ironcore/broker/bucketbroker/version.Commit=$(git log -n1 --format="%h")
LDFLAGS=${LDFLAGS} -X github.com/ironcore-dev/ironcore/broker/bucketbroker/version.Version=$(git describe --tags --abbrev=0)
However, there is currently no programmatic way to inject arbitrary flags to the docker-build recipes for a component. I suggest opening a follow up PR extending the Makefile capabilities to enable such injections.
Originally posted by @balpert89 in https://github.com/ironcore-dev/ironcore/pull/1297#discussion_r2120318623