Jenkins Pipeline - SVN Survey
I have a Jenkins pipeline template that uses a Jenkins file in Subversion.
Jenkins file has svn validation method to validate real application. (Svn url of real app is passed from jenkins env variables)
I need to svn poll a real application and run the job when the real application changes.
When I use the poll option in jenkins template, it always polls JenkinsFile in Subversion.
Is there a way to poll a real application?
source to share
I have the same problem. My SVN url is parameterized and the polling function is not evaluating variables => the build runs for sure: - (
But that's not what I want!
My real project is being checked in Jenkinsfile, so the workaround might be to exclude from Jenkinsfile replica from polling, but no choice in ui ...
Edit 1
I've updated my plugins and it seems to be working now. What version of the subversion plugin do you have?
I am using 2.7.1
Edit 2
No, it is not.
I cloned subversion-plugin-master and changed functionality from "BUILD_NOW" to "NO_CHANGES" if no URL is available.
With this modified version, the build does not run from the parameterized pipeline repository. The rest of the repos inside the Jenkins file are checked out correctly.
source to share
The problem in my case was that I tweaked the krone syntax every 5 hours instead of 5 minutes (which is a silly thing).
If you are using a Pipeline job where the DSL Pipeline is in the SCM console.
You can usually set up polling on a job using crone syntax and call the validation method from your jenkins. It will poll your real application. (His magic is behind the Jenkins)
In this configuration, you don't have polling inside the script (called Jenkinsfile here), but in the job config. So it works just like it does in any other jobs: it checks the remote SCM as configured with a cron statement, when it detects a modification, it checks the Pipeline script on the configured remote.
You can follow the below documentation
source to share