Not sure I got this right but if you are looking how the system check for modification and trigger new execution, Jenkinsfile need a successful manual build first. This will record the repos checkout and according to the jobs settings and the checkout options, can start polling/trigger new execution.
NOTE: Warning/Error build don't record the repos to be poll, you need a successful build for this to happen for the first time at least.
If you are looking how to trigger a build from a remote command: https://wiki.jenkins.io/display/JENKINS/Remote+access+API
Let me rephrase the issue : a/ here is my configuration - Jenkins #1 has been installed on network #1 - Jenkins #2 has been installed on network #2 - the only allowed port between network #1 and network #2 is HTTP/80 (from #1 to #2 only) -I'm using Jenkins #1 to trigger jobs on Jenkins #2
b/ I've been using remote access API fr a while on Jenkins 1.x and its working just fine :)
c/ I wanted to use the same feature on Jenkins 2.0, only with a 100% Jenkinsfile configuration. I can start remote jobs using curl/wget, but I cannot set the token through a Jenkinsfile property :(
Is it just possible ? Do I have to manually update all jobs ?