Only updated file only checkout for build

Only updated file need to checkout from bitbucket to bammboo for build purpose 

1 answer

Hi Bibin,


Bamboo does not have a built-in way to download only changes from any version control system (VCS). Though, you should be able to configure a series of custom script tasks using VCS commands (Git, SVN, etc) to detect any changes to the repository then pull only the changes.

Bamboo does not have a way to determine what changes were made to a repository between builds as Bamboo leaves the tracking of changes to repositories to the VCS. Perhaps the builds times could be queried from the Bamboo database and correlated to repository changes made afterward.

The following query should provide a list of code commits and commit files per build, and can be used as a starting point for the database deployment automation. Please note that the query may need to be adjusted slightly depending on the database server type being used.

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>;

Best Regards,

Bill

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,586 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you