
Thin runs the new gerritbot-matrix bot on the eavesdrop server. Change-Id: Ic11ca46aa4da61d5b80a8996ad900fdf83ab70dc
25 lines
743 B
ReStructuredText
25 lines
743 B
ReStructuredText
Run the gerritbot-matrix bot.
|
|
|
|
Create the *gerritbot_matrix_access_token* with this command:
|
|
|
|
.. code-block::
|
|
|
|
HOMESERVER_URL="https://opendev.ems.host"
|
|
USER="@gerritbot:opendev.org"
|
|
PASS="supersecret"
|
|
|
|
export MATRIX_TOKEN=$(curl -XPOST ${HOMESERVER_URL}/_matrix/client/r0/login -d '{"user": "'${USER}'", "password": "'${PASS}'", "type": "m.login.password"}' | jq -r ".access_token")
|
|
echo "gerritbot_matrix_access_token: ${MATRIX_TOKEN}"
|
|
|
|
Verify the token:
|
|
|
|
.. code-block::
|
|
|
|
curl -H "Authorization: Bearer ${MATRIX_TOKEN}" ${HOMESERVER_URL}/_matrix/client/r0/account/whoami
|
|
|
|
Delete the token:
|
|
|
|
.. code-block::
|
|
|
|
curl -H "Authorization: Bearer ${MATRIX_TOKEN}" -X POST ${HOMESERVER_URL}/_matrix/client/r0/logout -d{}
|