diff --git a/Dockerfile b/Dockerfile index 2d48f93..6720cd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM registry.access.redhat.com/ubi9/python-311:1-62.1717085982 +FROM registry.access.redhat.com/ubi9/python-311:1-72.1724040033 WORKDIR /app -COPY --chown=1001:0 *.py requirements.txt ./ +COPY --chown=1001:0 . . USER 1001 RUN pip install --no-cache-dir -r requirements.txt -CMD sleep 60 +CMD find . -name "*.py" -exec python {} \; && sleep 60 diff --git a/README.md b/README.md index 95bf29d..1ab4820 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,19 @@ Eyes-On-Docs ************ Scripts gathering HC3.0 PRs, issues and docs info from Github and Gitea. Scripts are works both for OTC and Swiss clouds in a one run. Data store in three Postgres databases: **_CSV_** is for a service tables and open PRs, failed Zuul PRs, issues and commits updates, **_ORPH_** is a dedicated DB special for orphan PRs -1) **otc_services_dict.py:** service script gathering metadata for service, its full names, categories and types. Should be run first, since all of the following scripts are relay on it in terms of repo names, service titles and squad names. -2) **gitea_info.py:** this script is using for open & orphan PRs data collecting -3) **github_info.py:** add info regarding child PRs in Github -4) **failed_zuul.py:** collecting info about PRs which checks in Zuul has been failed -5) **open_issues.py:** this script gather info regarding all open issues both from Gitea and Gitnub -6) **last_commit_info.py:** this script gather and calculate date of the last update of a prospective doc for all the services and types of docs (user manual, API reference and so on) -7) **scheduler.py:** this script checking postgres for orphans, unattended issues and outdated docs, and send notifications to Zulip, via OTC Bot. Runs as cronjob (see 'system-config' repo) +1) **eod_1_otc_services_dict.py:** service script gathering metadata for service, its full names, categories and types. + Should be run first, since all of the following scripts are relay on it in terms of repo names, service titles and squad names. +2) **eod_2_gitea_info.py:** this script is using for open & orphan PRs data collecting +3) **eod_3_github_info.py:** add info regarding child PRs in Github +4) **eod_4_failed_zuul.py:** collecting info about PRs which checks in Zuul has been failed +5) **eod_5_open_issues.py:** this script gather info regarding all open issues both from Gitea and Gitnub +6) **eod_6_last_commit_info.py:** this script gather and calculate date of the last update of a prospective doc for all + the services and types of docs (user manual, API reference and so on) +7) **eod_7_request_changes.py:** this script gather info about PRs where changes has been requested, from both + sides: OTC squads and upstream team, which is generating documentation +8) **eod_8_ecosystem_issue.py:** script for gathering issues for Eco Squad only +9) **eod_9_scheduler.py:** this script checking postgres for orphans, unattended issues and outdated docs, and send + notifications to Zulip, via OTC Bot. Runs as cronjob (see 'system-config' repo) Postgres database names, table names, Gitea & Github organization names and access tokens are store in environment variables. Notification schedule @@ -28,7 +34,7 @@ Notification anatomy ******************** This is how typical notification looks like. Since notifications do not differ in their structure, we can give an example of one of them. -![Notification anatomy](https://github.com/opentelekomcloud-infra/grafana-docs-monitoring/blob/documentation/alert_anatomy.PNG) +![Notification anatomy](https://github.com/opentelekomcloud-infra/eyes_on_docs/blob/documentation/alert_anatomy.PNG) **Alert name:** name of an alert. Could be *Orphaned PRs Alert,* *Outdated Documents Alert* or *Open Issues Alert.*\ **Alert summary:** what happened, what is this alert about.\ diff --git a/requirements.txt b/requirements.txt index 9453eff..437d067 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ certifi==2024.7.4 cffi==1.15.1 charset-normalizer==3.1.0 -cryptography==42.0.4 +cryptography==43.0.1 idna==3.7 psycopg2==2.9.6 pycparser==2.21 diff --git a/scripts/eod_9_scheduler.py b/scripts/eod_9_scheduler.py index 5a828fe..0cf4e97 100644 --- a/scripts/eod_9_scheduler.py +++ b/scripts/eod_9_scheduler.py @@ -23,6 +23,9 @@ "Database Squad": {"stream": "Database Squad", "topic": "Doc alerts"}, "Big Data and AI Squad": {"stream": "bigdata & ai", "topic": "helpcenter_alerts"}, "Compute Squad": {"stream": "compute", "topic": "hc_alerts topic"}, + "Security Services Squad": {"stream": "security services", "topic": "Doc Alerts"}, + "CMS Squad": {"stream": "CMS Squad", "topic": "Doc alerts"}, + "PaaS Squad": {"stream": "PaaS Squad", "topic": "Doc alerts"}, "Storage Squad": {"stream": "Storage Squad", "topic": "helpcenter_alerts"}, "Container squad": {"stream": "Container squad", "topic": "Doc alerts"}, "Network Squad": {"stream": "network", "topic": "Alerts_HelpCenter"} diff --git a/zuul.yaml b/zuul.yaml index 9b9fc20..2483699 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -1,22 +1,22 @@ --- - job: - name: grafana-docs-monitoring-build-image + name: eyes-on-docs-build-image parent: otc-build-container-image - description: Build grafana-docs-monitoring container image - provides: grafana-docs-monitoring-image - vars: &gdm_image_vars + description: Build eyes-on-docs container image + provides: eyes-on-docs-image + vars: &eod_image_vars container_images: - context: . registry: quay.io - repository: opentelekomcloud/grafana-docs-monitoring + repository: opentelekomcloud/eyes-on-docs tags: &imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}" - job: - name: grafana-docs-monitoring-upload-image + name: eyes-on-docs-upload-image parent: otcinfra-upload-container-images - vars: *gdm_image_vars + vars: *eod_image_vars - project: merge-mode: squash-merge @@ -25,10 +25,10 @@ node_version: 18 check: jobs: - - grafana-docs-monitoring-build-image + - eyes-on-docs-build-image gate: jobs: - - grafana-docs-monitoring-upload-image + - eyes-on-docs-upload-image release: jobs: - - grafana-docs-monitoring-upload-image + - eyes-on-docs-upload-image