Hey, i've been using pants for a while and i'd lik...
# general
Hey, i've been using pants for a while and i'd like to use spring boot actuator for environment infos, in particular also the git commit hash of the build. i really don't want to use git hooks for this to avoid ongoing merge conflicts and also would like to avoid fishy scripts in my CI pipeline that do some arbitrary bash magic. my preferred solution would be to include this somehow in the pants package goal, where the commit hash is automatically derived during packaging and that's it. my idea would be to use a resource as a dependency of my pex target, generated by a dependency on experimental_shell_command that pushes the commit hash in the resource file. Not entirely sure whether this actually works, but was wondering if someone can suggest a better solution or if there's some out of the box solution i'm not aware of yet. cheers!
@happy-kitchen-89482 added https://github.com/pantsbuild/pants/pull/15374 recently… the vast majority of it is not python specific, so further adapting it to this usecase might be a path forward
wouldn’t have access to the
working copy, since it is run in a sandbox
I've written up some docs for that feature: https://github.com/pantsbuild/pants/pull/16092
This was a good reminder
awesome. basically that's exactly what i was looking for 😄 thx!