1

I have created CI using SVN(windows), Jenkins and Chef.

One of my project currently gets polled in Jenkins from post-commit hook and code from Trunk gets uploaded to local server using Chef. Now we have UAT server on Azure and we need to upload code only once or twice a week. So will create a branch UAT and when developer wants to upload code to UAT Server, he will merge the trunk to UAT branch.

I will create a different Job in Jenkins and would trigger it from post-commit hook. Creating another job would get me another CURL command.

Now how do I call that particular CURL command from my post commit hook if UAT Branch got check-in/merge by developer.

Below is my post-commit.bat

SET REPOS=%1  
SET REV=%2  
SET SVNLOOK="C:\Program Files\VisualSVN Server\bin\svnlook.exe" 
SET PROJECT=PROJECT_NAME

curl "http://10.0.0.16:8080/job/PROJECT_NAME/build?token=123" // For Local-server

I'm not that good in coding so not sure if I should be using IF-ELSE or something else. And do I implement that.

0 Answers0