Skip to content

Job not found #65

@fgm

Description

@fgm
  • Gogs version (or commit ref): 0.12.0+dev
  • Jenkins version: 2.222.3
  • gogs-webhook-plugin version: 1.10.15
  • Jenkins modules used in combination with gogs-webhook-plugin: none
  • JSON Output of webhook:
    • Request:
      Request URL: https://(server)/gogs-webhook/?job=thejob
      Request method: POST
      Content-Type: application/json
      X-Github-Delivery: 2650ce88-b70f-4425-8e8c-ec79bcbfe6af
      X-Github-Event: push
      X-Gogs-Delivery: 2650ce88-b70f-4425-8e8c-ec79bcbfe6af
      X-Gogs-Event: push
      X-Gogs-Signature: 
      
    • Response
      Content-Length: 69
      Content-Type: application/json
      Date: Wed, 20 May 2020 13:46:54 GMT
      Server: Jetty(9.4.27.v20200227)
      X-Content-Type-Options: nosniff
      
      {"result":"ERROR","message":"Job 'thejob' is not defined in Jenkins"}
      

Description

This seems similar to my original issue in #8, but more recently #36 as I first had the issue with the job in a folder (thefolder/thejob), so I recreated it at root, without a folder, and it is listed with the standard Jenkins API. It may be related to #22 as this is a multibranch pipeline.

(server)/api/json?tree=jobs[name,builds[number,actions[parameters[name,value]]]]&pretty=true

  "_class": "hudson.model.Hudson",
  "jobs": [
    {
      "_class": "com.cloudbees.hudson.plugins.folder.Folder",
      "name": "thefolder"
    },
    {
      "_class": "org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject",
      "name": "thejob"
    }
    {
      "_class": "hudson.model.FreeStyleProject",
      "name": "test",
      "builds": [
        
      ]
    }
   ]
}

Branch discovery works normally in the Jenkins UI. When I use the same format to test a non-multibranch job (the test job), it works normally, hence the link to #22. Such normal jobs also work in folders (calling ?job=thefolder/test)

Same error when trying the hook on ?job=thejob/master, although it works with other branches beyond master, as described near the end of #8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions