<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Il plugin GIT di jenkins:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_default"><p style="font-family:helvetica,arial,sans-serif;font-size:13.3333px;line-height:13pt;color:rgb(0,0,0);margin:10px 0px;padding:0px"><i>The git plugin sets several environment variables you can use in your scripts:</i></p></div></blockquote><div class="gmail_default"><ul class="gmail-alternate" type="square" style="font-family:helvetica,arial,sans-serif;font-size:13.3333px;line-height:13pt;color:rgb(0,0,0)"><ul><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_COMMIT</tt> - SHA of the current</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_BRANCH</tt> - Name of the remote repository (defaults to <tt>origin</tt>), followed by name of the branch currently being used, e.g. "<tt>origin/master</tt>" or "<tt>origin/foo</tt>"</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i>GIT_LOCAL_BRANCH - Name of the branch on Jenkins. W<font color="#222222">hen the "checkout to specific local branch" behavior is configured, the variable is published.  If the behavior is configured as null or **, the property will contain the resulting local branch name sans the remote name.</font> </i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_PREVIOUS_COMMIT</tt> - SHA of the previous built commit from the same branch (the current SHA on first build in branch)</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_PREVIOUS_SUCCESSFUL_COMMIT</tt> - SHA of the previous <b>successfully</b> built commit from the same branch.</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_URL</tt> - Repository remote URL</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_URL_</tt><tt>N</tt> - Repository remote URLs when there are more than 1 remotes, e.g. GIT_URL_1, GIT_URL_2</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_AUTHOR_NAME</tt> and <tt>GIT_COMMITTER_NAME</tt> - The name entered if the "Custom user name/e-mail address" behaviour is enabled; falls back to the value entered in the Jenkins system config under "Global Config <a href="http://user.name">user.name</a> Value" (if any)</i></li><li style="font-size:10pt;line-height:13pt;margin:0px;padding:0px"><i><tt>GIT_AUTHOR_EMAIL</tt> and <tt>GIT_COMMITTER_EMAIL</tt> - The email entered if the "Custom user name/e-mail address" behaviour is enabled; falls back to the value entered in the Jenkins system config under "Global Config user.email Value" (if any)</i></li></ul></ul><div><font color="#000000" face="helvetica, arial, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font color="#000000" face="helvetica, arial, sans-serif"><span style="font-size:13.3333px">Nel tuo script ti basta fare un check su "GIT_BRANCH"</span></font></div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr">Karim N. Gorjux<br></div></div>
</div></div>