Use "curl" to trigger rtd.org webhook with http basic auth
For some reason (unknown really for us) triggering webhook with http basic auth using Ansible's uri module started recently failing when it is run on some operating systems, like e.g. Ubuntu Noble. Let's switch to use curl command directly to trigger that webhook instead. Change-Id: Idbf643ea27220504ac9e37eaf9f18930d2fc08ab
This commit is contained in:
parent
8deeecf821
commit
f2bc6bb699
@ -17,14 +17,15 @@
|
|||||||
when: rtd_credentials.password is not defined
|
when: rtd_credentials.password is not defined
|
||||||
|
|
||||||
- name: Trigger readthedocs build webhook via authentication
|
- name: Trigger readthedocs build webhook via authentication
|
||||||
uri:
|
# NOTE(ianw): 2024-11-08 the URI module fails here in mysterious
|
||||||
method: POST
|
# -- seeminly platform dependent -- ways; see
|
||||||
url: 'https://readthedocs.org/api/v2/webhook/{{ rtd_project_name }}/{{ rtd_webhook_id }}/'
|
# https://github.com/readthedocs/readthedocs.org/issues/11753
|
||||||
user: '{{ rtd_credentials.username }}'
|
# We call curl directly to work around this
|
||||||
password: '{{ rtd_credentials.password }}'
|
ansible.builtin.command: >-
|
||||||
# NOTE(ianw): testing it seems the API doesn't respond with
|
curl
|
||||||
# 401 so this is required
|
-X POST
|
||||||
force_basic_auth: yes
|
-u {{ rtd_credentials.username }}:{{ rtd_credentials.password }}
|
||||||
|
'https://readthedocs.org/api/v2/webhook/{{ rtd_project_name }}/{{ rtd_webhook_id }}/'
|
||||||
# avoid logging any credentials
|
# avoid logging any credentials
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user