Closed jcstorino closed 2 years ago
The problem is Unable to resolve object_kind with JSONPath $object_kind in
. And specifically $object_kind
which is not a valid JSONPath
. Your screenshot shows $.object_kind
, with the dot, which is valid.
Do you configure the plugin with properties in a pipeline script? Or manually in the job?
Hello Tomas, I believe I have found the problem, my mistake! One of the patches referenced is an array, so researching further, I found that the extension adds _n to the variable name, so I made it work !
Thanks a Lot ! http://www.jcstorino.com.br/ JULIO CESAR STORINO / Consultor Especialista e-mail: @. @.> tel: (11) 94955-9591
Em 12 de jul. de 2021, à(s) 15:43, Tomas Bjerre @.***> escreveu:
The problem is Unable to resolve object_kind with JSONPath $object_kind in. And specifically $object_kind which is not a valid JSONPath. Your screenshot shows $.object_kind, with the dot, which is valid.
Do you configure the plugin with properties in a pipeline script? Or manually in the job?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/generic-webhook-trigger-plugin/issues/208#issuecomment-878508126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVHLPQQM2GWIM7VUAYYVX3TXMZVXANCNFSM5AG2KVWA.
Version report
Jenkins and plugins versions report:
Reproduction steps
Unable to resolve label_title with JSONPath $labels[*].title in {"object_kind":"issue","event_type":"issue","user":{"id":1,"name":"Administrator","username":"root","avatar_url":"https://secure.gravatar.com/avatar/9d088a0412637eb0d00f4fd9ae9a1568?s=80\u0026d=identicon","email":"keynes.fernandes@credip.com.br"},"project":{"id":61,"name":"credipnet","description":"","web_url":"https://git.credip.coop.br/java/credipnet","avatar_url":null,"git_ssh_url":"git@git.credip.coop.br:java/credipnet.git","git_http_url":"https://git.credip.coop.br/java/credipnet.git","namespace":"java","visibility_level":0,"path_with_namespace":"java/credipnet","default_branch":"main","ci_config_path":null,"homepage":"https://git.credip.coop.br/java/credipnet","url":"git@git.credip.coop.br:java/credipnet.git","ssh_url":"git@git.credip.coop.br:java/credipnet.git","http_url":"https://git.credip.coop.br/java/credipnet.git"},"object_attributes":{"author_id":1,"closed_at":null,"confidential":false,"created_at":"2021-07-09 18:28:51 UTC","description":"Issue de Teste\n\n\n (╯°□°)╯︵ ┻━┻","discussion_locked":null,"due_date":null,"id":351,"iid":219,"last_edited_at":"2021-07-09 20:20:16 UTC","last_edited_by_id":1,"milestone_id":null,"moved_to_id":null,"duplicated_to_id":null,"project_id":61,"relative_position":-5678,"state_id":1,"time_estimate":0,"title":"Teste de Pipeline de Validação.","updated_at":"2021-07-10 00:12:03 UTC","updated_by_id":1,"url":"https://git.credip.coop.br/java/credipnet/-/issues/219","total_time_spent":0,"human_total_time_spent":null,"human_time_estimate":null,"assignee_ids":[],"assignee_id":null,"labels":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"state":"opened","action":"update"},"labels":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"changes":{"relative_position":{"previous":8790,"current":-5678},"labels":{"previous":[{"id":35,"title":"Fazendo","color":"#ed9121","project_id":61,"created_at":"2021-06-24 12:49:48 UTC","updated_at":"2021-06-24 12:49:48 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"current":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}]}},"repository":{"name":"credipnet","url":"git@git.credip.coop.br:java/credipnet.git","description":"","homepage":"https://git.credip.coop.br/java/credipnet"}} com.jayway.jsonpath.InvalidPathException: Illegal character at position 1 expected '.' or '[
Unable to resolve object_kind with JSONPath $object_kind in {"object_kind":"issue","event_type":"issue","user":{"id":1,"name":"Administrator","username":"root","avatar_url":"https://secure.gravatar.com/avatar/9d088a0412637eb0d00f4fd9ae9a1568?s=80\u0026d=identicon","email":"keynes.fernandes@credip.com.br"},"project":{"id":61,"name":"credipnet","description":"","web_url":"https://git.credip.coop.br/java/credipnet","avatar_url":null,"git_ssh_url":"git@git.credip.coop.br:java/credipnet.git","git_http_url":"https://git.credip.coop.br/java/credipnet.git","namespace":"java","visibility_level":0,"path_with_namespace":"java/credipnet","default_branch":"main","ci_config_path":null,"homepage":"https://git.credip.coop.br/java/credipnet","url":"git@git.credip.coop.br:java/credipnet.git","ssh_url":"git@git.credip.coop.br:java/credipnet.git","http_url":"https://git.credip.coop.br/java/credipnet.git"},"object_attributes":{"author_id":1,"closed_at":null,"confidential":false,"created_at":"2021-07-09 18:28:51 UTC","description":"Issue de Teste\n\n\n (╯°□°)╯︵ ┻━┻","discussion_locked":null,"due_date":null,"id":351,"iid":219,"last_edited_at":"2021-07-09 20:20:16 UTC","last_edited_by_id":1,"milestone_id":null,"moved_to_id":null,"duplicated_to_id":null,"project_id":61,"relative_position":-5678,"state_id":1,"time_estimate":0,"title":"Teste de Pipeline de Validação.","updated_at":"2021-07-10 00:12:03 UTC","updated_by_id":1,"url":"https://git.credip.coop.br/java/credipnet/-/issues/219","total_time_spent":0,"human_total_time_spent":null,"human_time_estimate":null,"assignee_ids":[],"assignee_id":null,"labels":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"state":"opened","action":"update"},"labels":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"changes":{"relative_position":{"previous":8790,"current":-5678},"labels":{"previous":[{"id":35,"title":"Fazendo","color":"#ed9121","project_id":61,"created_at":"2021-06-24 12:49:48 UTC","updated_at":"2021-06-24 12:49:48 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}],"current":[{"id":33,"title":"Aguardando Teste","color":"#eee600","project_id":61,"created_at":"2021-06-16 20:25:32 UTC","updated_at":"2021-06-28 19:19:32 UTC","template":false,"description":null,"type":"ProjectLabel","group_id":null}]}},"repository":{"name":"credipnet","url":"git@git.credip.coop.br:java/credipnet.git","description":"","homepage":"https://git.credip.coop.br/java/credipnet"}} com.jayway.jsonpath.InvalidPathException: Illegal character at position 1 expected '.' or '[
Results
Expected result:
Expected Pipeline to run when rule is true.
Actual result:
Pipeline doesn't run, I can't get the variable resolution logs and I get this error in the Jenkis log, listed above.