0
votes

I am new to Jenkins. I am trying a simple connection where my working copy is on Windows server and I am committing the code to a remote Linux server acting as a main repository.

My deployment code is on a different server where I have installed Jenkins and want the SVN UPDATE to run as soon as I commit anything on my working copy. I have done the post-commit hookup and Jenkins is getting an update too regarding this with proper revision and code updates but the physical SVN UPDATE is not taking place on that server. What am I committing wrong?

# Working Copy - Windows
# Main Repo - Linux Machine
# Code Deployment Server - Another Linux Machine [Here I am getting intimation about what changes are committed with revision number but physical "SVN COMMIT" is not happening]

### post-commit code on Main Repo machine:
------------------------------------------------
#!/bin/sh

CRUMB=$(curl -s 'http://username:password@hostname:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')

curl -X POST -H "$CRUMB" "http://hostname:8080/job/title/build?token=svnwillbetriggeredremotely" --user username:password

As soon as I commit on Windows machine (working copy), It gives me following on the Main Deployment server where I need the "SVN UPDATE" working:

Workspace of titlename on master
[I get all the filenames as updated with proper content and revision number]

What I want is "SVN UPDATE" to run on the deployment server directory.

My Jenkins Configuration:

Subversion URL - MainRepoHostname
Local module directory - Path for the local deployment directory where I need SVN UPDATE to work
Check-out Strategy - Use 'SVN Update' as much as possible.
1
It's hard to understand the question because of its formatting.bahrep
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.halfer

1 Answers

0
votes

I found the solution myself.

Actually, it was updating in the workspace directory and no absolute path can be given directly. We need to use the shell execute to do this. I did that and put commands in "Execute Shell" and it worked.