SVN and GIT Tag with Jenkins Job

Hi,

Tag make specific points in project history as this would be important. Typically people use this functionality to mark release points (v1.0, and so on).
In this Article, i am going to explain how to make a CVS (svn and git) tag using Jenkins.

SVN Tag



we begin by introducing project Repository URL, mentioned here as :
on blur, jenkins will ask for credential, if we follow this link we will got a form to introduce either:
  • a login/password for svn repository
  • SSH authentification
  • HTTPS client Certificat



After validating that form, we move on making an SVN Tag, i am going to it with ssh script.
So, this would be an ordinary svn command, and will look like this:

svn copy http://yourSvnServer/svn/projectName/trunk \
          http://yourSvnServer/svn/projectName/tags/TAG-"${BUILD_NUMBER}" \
          -m "Tagging the 1.0 release of the 'projectName' project."
If  your jenkins build give success response, you can check you tags projectName repository,
an new tag must exist.
${BUILD_NUMBER} here will take the number of jenkins build, for more environmental variables you can check this .


GIT Tag
Same thing, we precise Git project information: repository URL, Credentials, project name, and which branch to tag.


Finally we will add information for the Tag; we will add git Publisher plugin and fill Tag name
Tag-$BUILD_ID, tag messag, check create new Tag to have new tag every build, and we must a target remote name , as mentioned in the Git project information, or we will may have troubles


Commentaires

Posts les plus consultés de ce blog

Connecting to MS Exchange Server with Thunderbird

[Solr 4.7] : Installation, Configuration , Manipulation