jenkins the definitive guide

(Jeff_L) #1
git checkout 73434e4a0af0f51c242f5ae8efc51a88383afc8a

On the other hand, if you use a local branch named mylocalbranch, Jenkins would do the following:


git branch -D mylocalbranch
git checkout -b mylocalbranch 73434e4a0af0f51c242f5ae8efc51a88383afc8a

5.4.2.2.6. Local subdirectory for repo


By default, Jenkins will clone the Git repository directly into the build job workspace. If you prefer to
use a different directory, you can specify it here. Note that the directory you specify is relative to the
build job workspace.


5.4.2.2.7. Merge before build


The typical recipe for using this option is to fold an integration branch into a branch more similar to
master. Keep in mind that only conflict-less merges will happen automatically. More complex merges
that require manual intervention will fail the build.


The resultant merged branch will not automatically be pushed to another repository unless the later push
post-build action is enabled.


5.4.2.2.8. Prune remote branches before build


Pruning removes local copies of remote branches that exist as a remnant of the previous clone, but are
no longer present on the remote. In short, this is cleaning the local clone to be in perfect sync with its
remote siblings.


5.4.2.2.9. Clean after checkout


Activate Git’s facilities for purging any untracked files or folders, returning your working copy to a
pristine state.


5.4.2.2.10. Recursively update submodules


If you are using Git’s submodule facilities in the project, this option lets you ensure that every submodule
is up-to-date with an explicit call to update, even if submodules are nested within other submodules.


5.4.2.2.11. Use commit author in changelog


Jenkins tracks and displays the author of changed code in a summarized view. Git tracks both the
committer and author of code distinctly, and this option lets you toggle which of those two usernames
is displayed in the changelog.


5.4.2.2.12. Wipe out workspace


Typically Jenkins will reuse the workspace, merely freshening the checkout as necessary and, if you
activated the “Clean after checkout” option, cleaning up untracked files. However, if you prefer to have

Free download pdf