How to configure jenkins to automatically validate from SVN?

I am trying to configure jenkins server for build processes. My directory structure is as follows

/home/<user>/projects/MyProject /home/<user>/projects/MyProject/scripts /home/<user>/projects/MyProject/trunk 

I gave the upto scrips path for user workspace in jenkins, i.e. /home/<user>/projects/MyProject/scripts Now I want to check the project from the SVN trunk to my local trunk. When I give the path to the body ( /home/<user>/projects/MyProject/trunk ) for the local statement directory (where the project should be checked), Jenkins shows me that "the absolute path is not allowed . " How can I pass the trunk path for svn checkouts jenkins.

I spent hours searching for a solution for this, for example, jenkins doc, jenkins forum, hudson docs, hudson forum and here on SO, but could not find a solution for this. Please, help..

+4
source share
1 answer

For various (and reasonable) reasons, each Jenkins work has its own unique workspace. Best practice is to use relative (rather than absolute) paths and make your assemblies in the default workspace folder created by Jenkins.

However, sometimes when working with outdated code, paths are hard-coded into build scripts and difficult to change. In this case, you can use a custom workspace for this assembly:

  • In the pipeline job, use the ws('/home/<user>/projects/MyProject') { ... } step ws('/home/<user>/projects/MyProject') { ... } .
  • In the freestyle job, click the Advanced button and select the Use Custom Workspace check box, and then specify your own path.
0
source

All Articles