@ -8,8 +8,8 @@
|
|||||||
- name: Webhook
|
- name: Webhook
|
||||||
ansible.eda.webhook:
|
ansible.eda.webhook:
|
||||||
host: 0.0.0.0
|
host: 0.0.0.0
|
||||||
port: "{{ PROBLEM_MATCHER_PORT | default(5000) | int }}"
|
port: "{{ GIT_EVENT_RULEBOOK_PORT | default(5000) | int }}"
|
||||||
token: "{{ PROBLEM_MATCHER_TOKEN | default('-not-set-') }}"
|
token: "{{ GIT_EVENT_RULEBOOK_TOKEN | default('-not-set-') }}"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ if [ $# -eq 0 ]; then
|
|||||||
|
|
||||||
ansible-rulebook \
|
ansible-rulebook \
|
||||||
-r nofusscomputing.git_events.${GIT_EVENT_RULEBOOK_NAME} \
|
-r nofusscomputing.git_events.${GIT_EVENT_RULEBOOK_NAME} \
|
||||||
--env-vars PROBLEM_MATCHER_PORT,PROBLEM_MATCHER_TOKEN \
|
--env-vars GIT_EVENT_RULEBOOK_PORT,GIT_EVENT_RULEBOOK_TOKEN \
|
||||||
-v;
|
-v;
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
- name: Get facts from Environment
|
- name: Get facts from Environment
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
gitea_url: "{{ lookup('env', 'GITEA_INTERNAL_URL') | default(payload.repository.url) }}"
|
git_api_url: "{{ lookup('env', 'GIT_INTERNAL_API_URL') | default(payload.repository.url) }}"
|
||||||
gitea_replace_url: "{{ lookup('env', 'GITEA_URL') | default(payload.repository.url) }}"
|
gitea_replace_url: "{{ lookup('env', 'GIT_API_URL') | default(payload.repository.url) }}"
|
||||||
disable_logging: "{{ not lookup('env', 'ENABLE_DEBUG_LOGGING') | bool | default(false) }}"
|
disable_logging: "{{ not lookup('env', 'ENABLE_DEBUG_LOGGING') | bool | default(false) }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Set required Facts
|
- name: Set required Facts
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
git_url_api: "{{ payload.repository.url | replace(gitea_replace_url, gitea_url) }}"
|
git_url_api: "{{ payload.repository.url | replace(gitea_replace_url, git_api_url) }}"
|
||||||
git_url_path_jobs: 'actions/jobs'
|
git_url_path_jobs: 'actions/jobs'
|
||||||
head_sha: "{{ payload.workflow_job.head_sha }}"
|
head_sha: "{{ payload.workflow_job.head_sha }}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user