Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48298

Pipeline builds don't trigger on VSTS commit notification until there is one successful build manually triggered first

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • tfs-plugin
    • None
    • Jenkins 2.92
      TFS Plugin 5.126.0

      We have TFS commit notifications setup to push to a Jenkins service hook and rely on TFS plugin's push trigger option to trigger the jenkins job.

      UPDATE: we specify the Jenkinsfile from GIT SCM.

      The notification is able to trigger freestyle projects fine. However for pipeline projects auto-triggering only works after i have manually build the pipeline project successfully first.

      Additionally the pipeline project has to be successfully built for a repo url and credential combination. We found this recently when we had to change from ssh:// url to https:// repo url.

          [JENKINS-48298] Pipeline builds don't trigger on VSTS commit notification until there is one successful build manually triggered first

          Kellie Jos added a comment -

          Hi Debasish. Thank you for using the tfs-plugin! Could you provide me with a little bit more information to help me debug the issue?

          Are you using VSTS or TFS onPrem? If you are using TFS onPrem, what version do you have? 

          You mentioned that you are using a service hook to trigger the Jenkins job. When you review the service hook history, do you see that an event occurred when you pushed code to the repository?

          If the service hook is triggering an event, can you capture logs from your Jenkins server? This article provides information on how to do so: https://wiki.jenkins.io/display/JENKINS/Logging

          Thank you.

           

          Kellie Jos added a comment - Hi Debasish. Thank you for using the tfs-plugin! Could you provide me with a little bit more information to help me debug the issue? Are you using VSTS or TFS onPrem? If you are using TFS onPrem, what version do you have?  You mentioned that you are using a service hook to trigger the Jenkins job. When you review the service hook history, do you see that an event occurred when you pushed code to the repository? If the service hook is triggering an event, can you capture logs from your Jenkins server? This article provides information on how to do so:  https://wiki.jenkins.io/display/JENKINS/Logging Thank you.  

          Luca Landi added a comment - - edited

          We have a similar problem.

          We switched back from SSH to HTTPS because the new SSH endpoint wasn't matching the old format (instead of _git in the URL the new one uses _ssh and also the hostname is different) which broke all our TFS webhook configuration.

          We have jenkinsfile pipelines with "Build when a change is pushed to TFS/Team Services" option enabled and the service hook test we run from VSTS (external service) it's successful. Unfortunately nothing gets triggered on the jenkinsfile pipelines on SCM changes. I tried multiple versions of the plugin with Jenkins master version 2.89.2:

          • 5.126.0
          • 5.121.0
          • 5.3.4

          On version 5.121.0 we get a warning message in the logs:

          Jan 12, 2018 2:44:21 PM hudson.plugins.tfs.model.AbstractHookEvent pollOrQueueFromEvent
          WARNING: No Git jobs matched the remote URL 'https://ourtfs.visualstudio.com/Collection/_git/ourrepo' requested by an event.
          

          I thought initially that this was caused by the fact that there was "/DefaultCollection" specified in the middle of the https repo URL but even modifying any jenkinsfile job to remove "/DefaultCollection" I still get the same warning.

          Some people in my team are asserting that this plugin worked in the past but I didn't explore versions before 5.3.4.

          Any help would be really appreciated.

          Luca Landi added a comment - - edited We have a similar problem. We switched back from SSH to HTTPS because the new SSH endpoint wasn't matching the old format (instead of _git in the URL the new one uses _ssh and also the hostname is different) which broke all our TFS webhook configuration. We have jenkinsfile pipelines with "Build when a change is pushed to TFS/Team Services" option enabled and the service hook test we run from VSTS (external service) it's successful. Unfortunately nothing gets triggered on the jenkinsfile pipelines on SCM changes. I tried multiple versions of the plugin with Jenkins master version 2.89.2: 5.126.0 5.121.0 5.3.4 On version 5.121.0 we get a warning message in the logs: Jan 12, 2018 2:44:21 PM hudson.plugins.tfs.model.AbstractHookEvent pollOrQueueFromEvent WARNING: No Git jobs matched the remote URL 'https: //ourtfs.visualstudio.com/Collection/_git/ourrepo' requested by an event. I thought initially that this was caused by the fact that there was "/DefaultCollection" specified in the middle of the https repo URL but even modifying any jenkinsfile job to remove "/DefaultCollection" I still get the same warning. Some people in my team are asserting that this plugin worked in the past but I didn't explore versions before 5.3.4. Any help would be really appreciated.

          Ian Williams added a comment -

          redsolo is no longer maintaining plugin; unassigned issues

          Ian Williams added a comment - redsolo is no longer maintaining plugin; unassigned issues

            Unassigned Unassigned
            dskdas Debasish Das
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: