I found this issue to when running Git Plugin 3.1.0, Pipeline Plugin 2.5 - 
I'm doing checkout inside shared library which runs checkout in a loop 
according to config. However link git/notifyCommit?url=... gives me 
response "

No Git consumers using SCM API plugin for"


On Monday, 16 January 2017 13:33:09 UTC, alexand...@gmail.com wrote:
>
> Using Jenkins Pipeline there is no longer Source Code Management html-UI 
> section at job configuration (for a pipeline job checkout is handled the 
> pipeline script of the job).
>
> I am trying to trigger a test job by 'notifyCommit' http-query (using 
> curl):
> curl "http://<jenkins-address>/git/notifyCommit?url=ssh://git@<
> git-server-address>/<path>/<repo.git>" 
> <https://jenkins/git/notifyCommit?url=ssh://g...@git.company.com/namespace/projectA.git>
>
> This http-query successfully triggers my FreeStyle jobs with Source Code 
> Management configured (via job UI) appropriately.
> But any of my variants of Pipeline jobs containing 'git' or 'checkout scm' 
> are not triggered by this http-query.
>
> Here are some of my Pipeline job scripts I tried to set up 
> 'notifyCommit'-triggering:
> node (<node-label>) {
>   git url: 'ssh://git@<git-server-address>/<path>/<repo.git>', branch: 
> 'master', credentialsId: '<id>'
> }
> ---- this variant I borrowed from:
> https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md
> (see 'Creating a Simple Pipeline' section -> 'Understanding syntax' 
> sub-section)
> and modified in accordance with: 
> https://jenkins.io/doc/pipeline/steps/git/
>
> node (<node-label>) {
>   checkout(
>     [  $class: 'GitSCM',
>        userRemoteConfigs: [[url: 
> 'ssh://git@<git-server-address>/<path>/<repo.git>']],
>        credentialsId: '<id>'  ]
>   )
> }    
> ---- this variant I borrowed from:
> https://github.com/jenkinsci/workflow-scm-step-plugin/blob/master/README.md
> (see 'Generic SCM step' section)
>
> At html-UI of pipeline jobs I switched on 'Poll SCM' (without schedule).
> I tried with 'Poll SCM' unchecked also.
> For 'git' pipeline step I tried also 'poll' false and true values.
> Job HTML-UI setting 'Ignore post-commit hooks' was unchecked during all my 
> tries.
> Also I didn't use '$class: IgnoreNotifyCommit'.
> On the other hand I successfully configured a pipeline job to be triggered 
> via 'Trigger bulds remotely' set up.
>
> The readme I already referred few lines above (see link below) says that 
> it's possible to trigger pipeline job via 'notifyCommit':
> https://github.com/jenkinsci/workflow-scm-step-plugin/blob/master/README.md
> (see 'Features' section -> 'Polling' sub-section)
> ---- but there are no complete examples and no clarifications on several 
> aspects of such set up.
> Particularly it's unclear if both variants (with Jenkinsfile & with job 
> html-UI pipeline script) can be triggered via 'notifyCommit' http-query.
>
> Am I miss something?
> Can it be that my 'Jenkins' + 'Pipeline Plugin' + 'Git plugin' versions 
> have a bug?
> For now I use Jenkins 2.8, Pipeline Plugin 2.4, Git Plugin 3.0.0 .
>
>
> Kind regards
> Alexander Ites
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7b6cc5e8-e695-4bde-b66b-62b60b425564%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to