How to avoid Jenkins triggering on git commands within Jenkinsfile -
jenkins triggers whenever push onto remote branch. pipeline run using jenkinsfile script.
within jenkinsfile git push tags, command triggers jenkins again , kicks off build, in turn runs git push tags causing infinite loop.
how can avoid jenkins triggering on git commands within jenkinsfile?
have spent on week searching solution , nothing seems working, thank you.
normally, jenkins triggers build a (non-jenkinsfile) refspec refs/tags/*
so avoid this, specify refs/heads/*
(as seen here), or check issue 507 , uncheck "lightweight checkout" avoid getting tags.
Comments
Post a Comment