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

tfs plugin receives null as a commit id when triggered via jenkins service hook "code pushed"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • tfs-plugin
    • None
    • Jenkins: 2.73.2
      tfs-plugin: 5.121.0
      tfs: vsts

      I am unable to determine if it's wrong request parsing on jenkins-plugin side or wrong request from vsts/tfs side: I will file this bug for both: link to vsts issue

      an interesting detail is that when I test the trigger it works correctly and build on Jenkins succeeds: see codePushedTest.png screenshot.

        1. codePushedTest.png
          codePushedTest.png
          18 kB
        2. event.json
          5 kB
        3. image-2017-12-08-14-03-10-477.png
          image-2017-12-08-14-03-10-477.png
          44 kB
        4. jenkins-build-console.txt
          4 kB
        5. request.txt
          5 kB
        6. response.txt
          0.2 kB

          [JENKINS-47925] tfs plugin receives null as a commit id when triggered via jenkins service hook "code pushed"

          Kellie Jos added a comment -

          Hi Morgwai, are you still getting this error when using the service hook? From looking at the event it appears that the resource section is missing information on the commit.  There should be a commits entry contained in the resources section:

           

          As a workaround, you can try using the Queue Jenkins Job task in a VSTS build definition to trigger your Jenkins job whenever you push code. 

          Kellie Jos added a comment - Hi Morgwai, are you still getting this error when using the service hook? From looking at the event it appears that the resource section is missing information on the commit.  There should be a commits entry contained in the resources section:   As a workaround, you can try using the Queue Jenkins Job task in a VSTS build definition to trigger your Jenkins job whenever you push code. 

          John Lozano added a comment -

          +1 On this issue, i know tfs-git doesn't get a lot of love, but this bit me today.

          kelliejos, your workaround saved me, thanks!

          John Lozano added a comment - +1 On this issue, i know tfs-git doesn't get a lot of love, but this bit me today. kelliejos , your workaround saved me, thanks!

          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
            morgwai Morgwai Kotarbinski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: