Skip to content
Snippets Groups Projects
Commit 0d0812ab authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Merge branch 'los1131' into 'master'

Refer to a file for mattermost hook urls

See merge request !12
parents 5d5ff94d 9b34c733
No related branches found
No related tags found
1 merge request!12Refer to a file for mattermost hook urls
Pipeline #6602000 passed
......@@ -8,7 +8,7 @@
* `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
* `MATTERMOST_INTEGRATION_URL_PATH`: A path that contains the mattermost integration url used for alerting
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
......
......@@ -2,4 +2,4 @@ SCHEDULE="0 8 * * *"
DB_MOUNTPOINT="/mnt/data2/test/package_alerts"
INTERESTING_PACKAGES="dev.packages.yml"
FEEDS="rhel-8-for-x86_64-baseos-rpms,rhel-8-for-x86_64-appstream-rpms,rhel-9-for-x86_64-baseos-rpms,rhel-9-for-x86_64-appstream-rpms,almalinux-8-for-x86_64-AppStream-rpms,almalinux-8-for-x86_64-BaseOS-rpms,almalinux-9-for-x86_64-AppStream-rpms,almalinux-9-for-x86_64-BaseOS-rpms"
MATTERMOST_INTEGRATION_URL="https://mattermost.web.cern.ch/hooks/cy45ecb3kpgwbm88smkn4fa43h"
MATTERMOST_INTEGRATION_URL_PATH="/etc/nomad/mm_hook_test"
......@@ -21,6 +21,7 @@ job "${PREFIX}_package_alerts" {
}
volumes = [
"${DB_MOUNTPOINT}:/work",
"${MATTERMOST_INTEGRATION_URL_PATH}:/etc/mattermost_hook_url",
]
}
......@@ -28,7 +29,6 @@ job "${PREFIX}_package_alerts" {
NOMAD_ADDR = "$NOMAD_ADDR"
INTERESTING_PACKAGES = "$INTERESTING_PACKAGES"
FEEDS = "$FEEDS"
MATTERMOST_INTEGRATION_URL = "$MATTERMOST_INTEGRATION_URL"
RHSM_OFFLINE_TOKEN = "$RHSM_OFFLINE_TOKEN"
}
......
......@@ -19,7 +19,12 @@ import yaml
offline_token = os.getenv("RHSM_OFFLINE_TOKEN")
interesting_packages_file = os.getenv("INTERESTING_PACKAGES")
unformatted_feeds = os.getenv("FEEDS")
mattermost_integration_url = os.getenv("MATTERMOST_INTEGRATION_URL")
try:
with open('/etc/mattermost_hook_url', encoding='utf-8') as f:
mattermost_integration_url = f.read()
except (FileNotFoundError, IsADirectoryError):
mattermost_integration_url = None
if (
offline_token is None
......
......@@ -2,4 +2,4 @@ SCHEDULE="*/30 * * * *"
DB_MOUNTPOINT="/mnt/data2/package_alerts"
INTERESTING_PACKAGES="prod.packages.yml"
FEEDS="rhel-8-for-x86_64-baseos-rpms,rhel-8-for-x86_64-appstream-rpms,rhel-9-for-x86_64-baseos-rpms,rhel-9-for-x86_64-appstream-rpms,almalinux-8-for-x86_64-AppStream-rpms,almalinux-8-for-x86_64-BaseOS-rpms,almalinux-9-for-x86_64-AppStream-rpms,almalinux-9-for-x86_64-BaseOS-rpms"
MATTERMOST_INTEGRATION_URL="https://mattermost.web.cern.ch/hooks/qiodnmzwbjg9zkyxkxoh1h47sh"
MATTERMOST_INTEGRATION_URL_PATH="/etc/nomad/mm_hook_prod"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment