Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,640
Community Members
 
Community Events
176
Community Groups

Run script on each changed file?

We have some standards checking type scripts that we want to run on each file of a certain type that has changed. We also use model based develop, and would like to try regenerating code from the model if the model changes. Is there any functionality that allows for this within Bamboo? Right now, I'm thinking I will have to write my own script to list out of the changed files from the previous build to the current build. Then loop over that list and perform the task on each one in the list. I didn't want to reinvent the wheel though if Bamboo already provides a similar functionality.

1 answer

0 votes
Bill Carreon Atlassian Team Mar 29, 2018

Hi Cory,

While Bamboo does not have a “track changed files” feature, the database does log the commit changes. The below query should provide a decent starting point for your project, as it includes code and file commits per build.

SELECT a.AUTHOR_NAME,

   uc.COMMIT_DATE,

   uc.COMMIT_REVISION,

   uc.COMMIT_COMMENT_CLOB,

   cf.COMMIT_FILE_NAME

   FROM USER_COMMIT uc

JOIN REPOSITORY_CHANGESET rc ON (uc.REPOSITORY_CHANGESET_ID = rc.REPOSITORY_CHANGESET_ID)

JOIN BUILDRESULTSUMMARY brs ON (rc.BUILDRESULTSUMMARY_ID = brs.BUILDRESULTSUMMARY_ID)

JOIN AUTHOR a ON (a.AUTHOR_ID = uc.AUTHOR_ID)

JOIN COMMIT_FILES cf ON (uc.COMMIT_ID = cf.COMMIT_ID)

WHERE brs.BUILD_KEY = '<BUILD_KEY>'

 AND brs.BUILD_NUMBER = <BUILD_NUMBER>;

 

Cheers,

Bill

Dev Tools Support | Atlassian 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events