With Jenkins git plugin, you have options for branch, url and credentials. How do I pass the revision (SHA1), in order to checkout a particular revision of the branch? https://wiki.jenkins.io/display/JENKINS/Git+Plugin
Thanks.
With Jenkins git plugin, you have options for branch, url and credentials. How do I pass the revision (SHA1), in order to checkout a particular revision of the branch? https://wiki.jenkins.io/display/JENKINS/Git+Plugin
Thanks.
In general, you can't. The plugin will always fetch and check out references, not commits.
Fetching specific commits by SHA1 is a relatively new feature (see Retrieve specific commit from a remote Git repository); it is not even support by all repository servers.
If you're sure that the SHA1 exists on the branch that has been fetched, then you're free to git reset
the working copy in a build step. However, you'd mess with a git clone that's maintained by the git plugin -- so I recommend to take care of the entire clone/fetch/checkout step yourself, not using the git plugin.