Extrafield in webhook URL

Hi again.

We’re trying to set some extrafields to be used in a webhook, but it seems not to be replaced in the URL of the webhook like you can see in the attached pictures.

Any idea? Are we doing something wrong?

Thank you.

1 Like

Is there a value set for this repository on the jenkins_job_id extra var? The substitution only works for set values.

Yes of course.

Regards.

OK, confirmed that there’s a problem with this on 4.10 series.

We’ll fix it on next bugfix release probably within few days.

Best,

Ok! Thank you very much!

Regards

Release 4.11.2 is out that fixes this problem. Thanks for reporting!

Thank you very much!

I setting up a JSON webhook to a Fisheye server and it looks like I have the same problem running 4.23.1 community:

  File "/opt/rhodecode/store/wz9gh57g4zk6aklc1b6d996l50az2kkx-python2.7-requests-2.22.0/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 405 Client Error: Method Not Allowed for url: http://<server-dns>/rest-service-fecru/admin/repositories/$%7Bextra__fisheye-name%7D/incremental-index

(obfuscated the server’s DNS name in the log).

I have set the extra field on the repo where I am testing this like so:

And the global JSON webhook is set like so:

With these settings, I would expect to replace the extra field with ‘cm_scripts-fork’ in the URL.

I have tried using ${repo_name} at that spot but that gives met the repo name with Rhodecode folder name and I just need the repo name without the folder name. So that was not working for me. So the extra field looks like the best option.

Where am I going wrong? Or has the same problem re-surfaced.

Best Regards,

Frits.

This should work fine, can you try using key: fisheye_name with an underscore ?

That fixed the URL indeed:

HTTPError: 405 Client Error: Method Not Allowed for url: http://<dns-name>/rest-service-fecru/admin/repositories/cm_scripts-fork/incremental-index

The variable expanded properly.
(Now I am hitting another problem in the Fisheye server authentication or so but that is my problem).

I had tried different key names and checked maybe not using capitals or so but that did not make a difference. Did not think of varying the ‘-’ into something else. Using a ‘-’ is usually safe in a URL so never thought of it.

Thanks!

Addition: The rest of the problems with the URL were indeed authentication and having to using PUT iso POST.