Re: Is it actually possible to trigger pipeline job without Jenkinsfile by notifyCommit http-query?

2017-03-29 Thread kodstark
Actually I got that working - when pipeline completes first time then it 
will be executed via notifyCommit?url service

-- 
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/046fd94a-e575-471b-b5d1-099524d33fdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it actually possible to trigger pipeline job without Jenkinsfile by notifyCommit http-query?

2017-03-29 Thread kodstark
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:///git/notifyCommit?url=ssh://git@<
> git-server-address>//" 
> 
>
> 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 () {
>   git url: 'ssh://git@//', branch: 
> 'master', credentialsId: ''
> }
>  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 () {
>   checkout(
> [  $class: 'GitSCM',
>userRemoteConfigs: [[url: 
> 'ssh://git@//']],
>credentialsId: ''  ]
>   )
> }
>  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.


Is it actually possible to trigger pipeline job without Jenkinsfile by notifyCommit http-query?

2017-01-16 Thread alexander . ites
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:///git/notifyCommit?url=ssh://git@<
git-server-address>//" 


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 () {
  git url: 'ssh://git@//', branch: 
'master', credentialsId: ''
}
 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 () {
  checkout(
[  $class: 'GitSCM',
   userRemoteConfigs: [[url: 
'ssh://git@//']],
   credentialsId: ''  ]
  )
}
 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/e6aab9b9-9442-45de-94aa-f9022faad6e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.