0

I have created a job in the Jenkins for the .net component. I want a condition or feature in the Jenkins to check if the repo of that component is updated by the SVN or not. If code is updated in the SVN then only that component should be build. By this way, I want to configure multiple jobs.

Pankaj Saha
  • 869
  • 3
  • 17
  • 37

1 Answers1

-1

You have to set the job in order to pull from an SVN Repository.

http://blogs.wandisco.com/wp-content/uploads/2012/01/jenkins-poll-5-mins.png

You will be able to setup your pulling frequency, the basic poll configuration will check for new commit in all the SVN repositories checked out by your job.

ivoruJavaBoy
  • 1,307
  • 2
  • 19
  • 39
  • Thanks for the reply. But I have multiple components and i have created the pipeline for those components for example A -> B-> C-> D. If I start the build of A component then it will automatically build the B but I need to check if there are any changes in the B then only build should be initiated otherwise it will build C. – Pankaj Saha Nov 06 '17 at 09:23
  • Sorry i did not get it, by the way what about get the SVN repo root module path chaged and than use it as variable to run the build from there? If it would be a JAVA project Maven or Ivy can be used to trigger a build if a Maven/Ivy jar dependency that the project uses changes or identifying automatically the module that has been changed by a commit, but i don't know if there are similar options in .NET – ivoruJavaBoy Nov 06 '17 at 09:26
  • In short i want a machanishm where I can initiate the build without using the pool machanishm I will click the build for a job and job first get the latest code form the svn. If there are any svn changes then only build will be initiated otherwise build not initiate. – Pankaj Saha Nov 06 '17 at 09:44
  • and what I said is exactly the same...Use a groovy script, get the last changes from the checked out repo, (have you the repo locally checked out right?) ---> https://stackoverflow.com/questions/42461300/how-to-get-commits-information-on-jenkins-using-groovy-since-last-successful-bui Once done you just have to run the build command form there, MS build or whatever you are using to build...The the normale pipeline A -> B-> C-> D will keep from there... – ivoruJavaBoy Nov 06 '17 at 09:52