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

What do Bamboo source repository plugins do before pre-build actions?

Todd_Gamblin March 8, 2015

The Agent build process diagram shows that source repository plugins are used in the "Prepare build directories" step of Bamboo's build process.  What does the source repository plugin do there?  Is the VCS command (git, svn, etc.) actually invoked at that point, before the pre-buld action?

I am interested in whether any external process is launched before the pre-build action.  I am attempting to design a plugin that would allow agents to run each job as a separate user, and I would like to call setuid from a pre-build action.  But, if a VCS command like git, which supports clent-side hooks, is executed before the pre-build action, then users could potentially execute code as root by writing their own hooks into a client-side repository.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Todd_Gamblin March 8, 2015

After researching this, it appears that BEFORE the pre-build action, Bamboo executes PreparationTasks. The only class that currently implements this is the VcsCheckoutTask, but that task does indeed execute the VCS program, which means that any pre-build action is executed too late to safely call setuid.  So I can't use pre-build actions to call setuid.

It does not appear that there is a hook earlier than VCS checkout from which a plugin could do something that would affect all processes launched by build agents.

TAGS
AUG Leaders

Atlassian Community Events