On Wed, Sep 27, 2017 at 6:11 PM Elifarley Cruz <elifar...@gmail.com> wrote:
> I have a multibranch pipeline job that runs on a Linux slave. The source > code comes from a git repo at BitBucket. > > Now, 3 questions: > > 1) I suppose that, for each new build, a "git pull" or similar is > executed, instead of a more expensive "git clone". Am I right? > > Yes, you're right. The git plugin detects if the workspace already contains a git repository. If a git repository is detected, then that repository is updated rather than being cloned again. > 2) Furthermore, I guess the "git pull" is executed twice: one at the > master, and one at the slave. Is that true? > > if the multibranch pipeline is using the Bitbucket branch source plugin, it may be using Bitbucket API's to retrieve a single file (the Jenkinsfile) rather than cloning the entire repository on the master. If the multibranch pipeline is using the git implementation, it doesn't know those API's, so it will clone the full repository to the master. > 3) If so, after the build is done, how can I get the path to the .git > folder on the master and also on the slave? > > Please don't perform operations in the repository on the master. It is not intended for use by anything other than Jenkins itself. We've had several different problems reported by users who mistakenly thought they could use the copy of the repository on the master. On the agent, the .git folder is in the workspace directory. If you use a dir("xx") { } wrapper around the checkout, then the .git folder will be placed inside that directory. Can you explain why you need the location of the .git folder on the agent? Even more, can you explain why you need the location of the .git folder on the agent? Mark Waite > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/69a50419-c5ff-4a3b-b919-ab4f8f7658db%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/69a50419-c5ff-4a3b-b919-ab4f8f7658db%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtE7cpaxrhKjSukxCCcF_jpovCK-N2R%2BECJO7C9er2Kh%2BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.