1

We are using Jenkins and our build relies heavily on SharedLibraries. In our build we want to get the HEAD Commit-ID of our SharedLibrary. Do you have an idea how to manage this? Is there a default location where the checkout out shared library is stored?

We do not need the command for getting the HEAD commit id as we already know it: git rev-parse HEAD

We need to get to the location of the shared library on Jenkins in order to execute this command.

The location specified in [this post][1] does not work anymore. I think this is due to the [following fix][2]

[1]: https://stackoverflow.com/questions/42426638/where-does-the-jenkins-shared-library-files-get-stored#:~:text=If%20the%20shared%20library%20is,occupied%20by%20another%20concurrent%20build). [2]: https://github.com/jenkinsci/workflow-cps-global-lib-plugin/commit/ace0de3c2d691662021ea10306eeb407da6b6365

torek
  • 448,244
  • 59
  • 642
  • 775
ychy123
  • 11
  • 1

0 Answers0