Plugin to use git commands on script pre-build step

48 views
Skip to first unread message

Vincent Domingues

unread,
Apr 20, 2016, 10:05:17 AM4/20/16
to Jenkins Developers
Hello,

I'm looking for a plugin that's allow me to use git commands on a pre-build script step to perfom some controls.

Actually before launching a build, i want to check if all the reports have been made for this i need this command :

git merge-base --is-ancestor <commit-from-build> <commit-last-prod-ref>

I have mad some search and i may be i don't need a plugin but i hope you can tell me.

I have been thinking about installing git on my jenkins server and slaves and i'll be able to perfome my git commands on the workspace ?

Thank you in advance.

Regards,
Vincent

Björn Pedersen

unread,
Apr 20, 2016, 10:38:14 AM4/20/16
to Jenkins Developers
Hi,
So you actually need a step that runs after check-out, but before the normal job script?

Depending on the result your build should have, you have some options:
 
 * use a simple shell step and return with exit 1 if your preconditions are not met -> status: ->failed
 * use the release-build-plugin and configure a pre-release step
 * use the conditional-build plugin and use the provided conditional-build steps

Björn

Vincent Domingues

unread,
Apr 20, 2016, 11:06:44 AM4/20/16
to Jenkins Developers
So you actually need a step that runs after check-out, but before the normal job script? YES

My issue it's that i don't know how to perfom git commands on this simple shell, how to have a git client to perfom my commands ?

Thanks.
Reply all
Reply to author
Forward
0 new messages