[users at bb.net] How to get list of changed files since the last successful build?

SB progscriptclone at gmail.com
Sun Aug 4 14:13:53 UTC 2019


I come from Jenkins, and there, it is possible to obtain the Git commit
hash associated with the last successful build on a Git branch. The
environment variable GIT_PREVIOUS_SUCCESSFUL_COMMIT is provided by the
Jenkins Git plugin. For each build, its value is set to the commit hash of
the previous successfully built commit on the branch. The commit hash can
then be used to compute the list of changed files. That's how I am able to
get the list of changed files in Jenkins.

With Buildbot, how can I:

   - get the Git commit hash of the last successful build for a branch, or
   alternatively,
   - get the list of changed files since the last successful build for a
   Git branch?

I know how to get the list of changed files since the last build for a
branch, but I just don't know how to get the list of changed files since
the last *successful* build.

*Use cases*

   -

   The list of changed files since the last successful build will be used
   in a build script. The build script (invoked as a Buildbot BuildFactory
   step) uses the list of changed files to determine how the project should be
   built.
   -

   The commit hash of last successful build is useful for rolling back
   source code to the last successful build's revision when newly submitted
   code does not work.

(Originally posted on Stack Overflow (
https://stackoverflow.com/q/57239124/5916915). The question has a Stack
Overflow bounty ending on August 7, 2019.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20190804/a3c45a79/attachment.html>


More information about the users mailing list