diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8502613d7795c0f5cc662298b62a10ffc6f68d6..e11ea0c553e59c6e199b71f0d7a66c219e277fca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,9 @@ --- include: 'https://gitlab.cern.ch/linuxsupport/cronjobs/base/raw/master/gitlab-ci.yml' -build_centos_rss: +build_package_alerts: extends: .build_image variables: - CONTEXT_DIR: centos_rss - DOCKER_FILE: centos_rss/Dockerfile - TO: $CI_REGISTRY_IMAGE/centos_rss + CONTEXT_DIR: package_alerts + DOCKER_FILE: package_alerts/Dockerfile + TO: $CI_REGISTRY_IMAGE/package_alerts diff --git a/README.md b/README.md index d63d99e62ff12b688b484422fb3e83ab35427832..634ccd8f1d8cefec880ccd0681af1dca75db224b 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ -# centos_rss +# package_alerts -* This is a script that parses RSS content from feeds.centos.org and stores the content in a sqlite databse +* This is a script that parses Red Hat API content from [https://access.redhat.com/management/api/rhsm](https://access.redhat.com/management/api/rhsm) and stores the content in a text file * Should there be a package that is deemed as interesting, the script will make a post to a mattermost integration url * Neccessary variables: * `SCHEDULE`: Nomad schedule - * `SQL_DB_MOUNTPOINT`: Filesystem path to mount as `/sqldb` - * `SQL_DB_FILE`: Filename of the sqlite file - * `FEEDS`: Comma separated list of feeds to check from feeds.centos.org + * `DB_MOUNTPOINT`: Filesystem path to mount as `/dbmount`` + * `FEEDS`: Comma separated list of "csets" to check from Red Hat * `INTERESTING_PACKAGES`: Name of the file that contains info about the packages we should inform about via mattermost * `MATTERMOST_INTEGRATION_URL`: The mattermost integration url to provide updates to -Most modifications will be done to `/centos_rss/prod.packages.yml`, which is where you can set up +Most modifications will be done to `/package_alerts/prod.packages.yml`, which is where you can set up what packages you want to keep an eye on. You can add a specific feed to watch and notes to include in the notification, like so: @@ -19,7 +18,7 @@ in the notification, like so: --- packages: glog: - feed: 'centos-8-.*' + feed: 'rhel-9-for-x86_64-baseos-rpms' notes: |- Hopefully this package fixes [Bugzilla 2055222](https://bugzilla.redhat.com/show_bug.cgi?id=2055222). If it does, then you can remove `gflags-2.2.2-1.el8.*` from [stream8_snapshots/packages_filtered.lst](https://gitlab.cern.ch/linuxsupport/cronjobs/stream8_snapshots/-/blob/161bdc37a36f103881e66ce7e84fe046a8720cea/stream8_snapshots/packages_filtered.lst#L14). diff --git a/centos_rss.nomad b/package_alerts.nomad similarity index 79% rename from centos_rss.nomad rename to package_alerts.nomad index 1a68f0a0b8856d0added4b0ce9f89f43a066daa9..8acd13089cef81477ff8a069426bb3559b64ac95 100644 --- a/centos_rss.nomad +++ b/package_alerts.nomad @@ -1,4 +1,4 @@ -job "${PREFIX}_centos_rss" { +job "${PREFIX}_package_alerts" { datacenters = ["*"] type = "batch" @@ -9,14 +9,14 @@ job "${PREFIX}_centos_rss" { prohibit_overlap = true } - task "${PREFIX}_centos_rss" { + task "${PREFIX}_package_alerts" { driver = "docker" config { - image = "https://gitlab-registry.cern.ch/linuxsupport/cronjobs/centos_rss/centos_rss:${CI_COMMIT_SHORT_SHA}" + image = "https://gitlab-registry.cern.ch/linuxsupport/cronjobs/package_alerts/package_alerts:${CI_COMMIT_SHORT_SHA}" logging { config { - tag = "${PREFIX}_centos_rss" + tag = "${PREFIX}_package_alerts" } } volumes = [ diff --git a/centos_rss/Dockerfile b/package_alerts/Dockerfile similarity index 62% rename from centos_rss/Dockerfile rename to package_alerts/Dockerfile index f4792c212c0a0d632d05b41ef64c17aa9e04999a..c65f3760a5f0a4840849f9ad00a4f856596ccfd9 100644 --- a/centos_rss/Dockerfile +++ b/package_alerts/Dockerfile @@ -2,6 +2,6 @@ FROM gitlab-registry.cern.ch/linuxsupport/alma9-base:latest RUN dnf -y install python3 python3-dnf python3-requests python3-yaml -COPY centos_rss *.packages.yml /root/ +COPY package_alerts *.packages.yml /root/ -ENTRYPOINT ["/root/centos_rss"] +ENTRYPOINT ["/root/package_alerts"] diff --git a/centos_rss/dev.packages.yml b/package_alerts/dev.packages.yml similarity index 100% rename from centos_rss/dev.packages.yml rename to package_alerts/dev.packages.yml diff --git a/centos_rss/centos_rss b/package_alerts/package_alerts similarity index 100% rename from centos_rss/centos_rss rename to package_alerts/package_alerts diff --git a/centos_rss/prod.packages.yml b/package_alerts/prod.packages.yml similarity index 100% rename from centos_rss/prod.packages.yml rename to package_alerts/prod.packages.yml