Ivan Stefanovic
Ivan Stefanovic

Reputation: 41

Get Commit Files List on Bamboo

Does anyone know how to get list of files that were committed and got Bamboo CI server triggered? My aim is to get a list of changed files during build process and to validate them (PHPlint, validating twig files..) on Bamboo with custom scripts. Problem is that Bamboo always does "git clone", so searching git log can't help.

Upvotes: 3

Views: 2431

Answers (2)

Anton Kuryan
Anton Kuryan

Reputation: 607

Crossposting an answer found on https://community.atlassian.com/t5/Answers-Developer-Questions/Bamboo-Determine-git-commit-details-files-changed-before/qaq-p/483322

This requirement could be fulfilled by using Bamboo REST API: /rest/api/latest/result/<bamboo.buildKey>/<bamboo.build.Number>?expand=changes.change.files

Upvotes: 1

sam
sam

Reputation: 96

(Sorry I wanted to comment but my reputation is too low). I think if you uncheck "Use shallow clones" on your repository options then you will get let's say a full clone with the history of your git repo. Then from a script task you will be able to do a git clone.

Good luck

Upvotes: 0

Related Questions