I should add that the job is of multibranch type.

On Thursday, March 23, 2017 at 3:10:51 PM UTC+2, Idan Adar wrote:
>
> Hi all,
>
> In a declarative pipeline (a Jenkinsfile in the repo), how can I stop a 
> job from getting re/triggered due to a push event in GitHub?
> For example:
>
> stage ("Publish to npm") {
>    steps {
>       sh '''
>          npm publish
>          npm --no-git-tag-version version minor
>       '''
>       
>       sh '''
>          git commit -am 'Bumped version number'
>          git push
>       '''
>    }
> }
>
> The "git push" will trigger the push webhook in GitHub that makes a call 
> to Jenkins, which will in turn start the same Jenkinsfile and again bump 
> the version, commit, push and again... a loop.
> How can we not-trigger the job in this scenario?
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/af0d3836-ae98-4e09-93bf-9dfa4d65b39f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to