From 576eb7f23779f58c041f040f09b70de89ea3c619 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:47:32 -0400 Subject: [PATCH] chore(docs): redirect docs pages to new docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- docs/bots/opsgenie-bot.md | 5 ++++ docs/bots/overview.md | 5 ++++ docs/bots/slack-bot.md | 5 ++++ docs/bots/telegram-bot.md | 5 ++++ docs/catalog.md | 5 ++++ docs/functions.md | 5 ++++ docs/index.md | 5 ++++ docs/monitoring.md | 5 ++++ docs/services/alertmanager.md | 5 ++++ docs/services/email.md | 5 ++++ docs/services/github.md | 5 ++++ docs/services/googlechat.md | 5 ++++ docs/services/grafana.md | 5 ++++ docs/services/mattermost.md | 5 ++++ docs/services/opsgenie.md | 5 ++++ docs/services/overview.md | 5 ++++ docs/services/pushover.md | 5 ++++ docs/services/rocketchat.md | 5 ++++ docs/services/slack.md | 5 ++++ docs/services/teams.md | 5 ++++ docs/services/telegram.md | 5 ++++ docs/services/webhook.md | 5 ++++ docs/subscriptions.md | 5 ++++ docs/templates.md | 5 ++++ docs/triggers.md | 5 ++++ docs/troubleshooting-commands.md | 5 ++++ docs/troubleshooting-errors.md | 5 ++++ docs/troubleshooting.md | 5 ++++ docs/upgrading/0.x-1.0.md | 5 ++++ hack/set-docs-redirects.sh | 41 ++++++++++++++++++++++++++++++++ 30 files changed, 186 insertions(+) create mode 100755 hack/set-docs-redirects.sh diff --git a/docs/bots/opsgenie-bot.md b/docs/bots/opsgenie-bot.md index 9ef7d9c7..6ae36c84 100644 --- a/docs/bots/opsgenie-bot.md +++ b/docs/bots/opsgenie-bot.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + # Opsgenie bot !!! note "Do you need Opsgenie bot? Please consider contributing or create [feature request](https://github.com/argoproj-labs/argocd-notifications/issues/new)!" diff --git a/docs/bots/overview.md b/docs/bots/overview.md index 0f908fbe..45eb4898 100644 --- a/docs/bots/overview.md +++ b/docs/bots/overview.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + The optional bot component simplifies managing subscriptions. The end users can use bot commands to manage subscriptions even if they don't have access to the Kubernetes API and cannot modify annotations. diff --git a/docs/bots/slack-bot.md b/docs/bots/slack-bot.md index c3225c27..c0ad127d 100644 --- a/docs/bots/slack-bot.md +++ b/docs/bots/slack-bot.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + # Slack bot The Slack bot leverages [slash commands](https://api.slack.com/interactivity/slash-commands). The bot allows slack users diff --git a/docs/bots/telegram-bot.md b/docs/bots/telegram-bot.md index 1d79d07a..832aa1cc 100644 --- a/docs/bots/telegram-bot.md +++ b/docs/bots/telegram-bot.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + # Telegram bot !!! note "Do you need Telegram bot? Please consider contributing or create [feature request](https://github.com/argoproj-labs/argocd-notifications/issues/new)!" diff --git a/docs/catalog.md b/docs/catalog.md index 2a663224..7161d342 100644 --- a/docs/catalog.md +++ b/docs/catalog.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/catalog//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/catalog//). Redirecting to the new page. + # Triggers and Templates Catalog ## Triggers | NAME | DESCRIPTION | TEMPLATE | diff --git a/docs/functions.md b/docs/functions.md index 668a0f60..468a33d8 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/functions//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/functions//). Redirecting to the new page. + ### **time** Time related functions. diff --git a/docs/index.md b/docs/index.md index 27d0f654..57cb8cd5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + # Overview Argo CD Notifications continuously monitors Argo CD applications and provides a flexible way to notify diff --git a/docs/monitoring.md b/docs/monitoring.md index 31b6f45c..e6172132 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/monitoring//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/monitoring//). Redirecting to the new page. + # Monitoring The Argo CD Notification controller serves Prometheus metrics on port 9001. diff --git a/docs/services/alertmanager.md b/docs/services/alertmanager.md index e0f9d7e4..dc982d2d 100644 --- a/docs/services/alertmanager.md +++ b/docs/services/alertmanager.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/alertmanager//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/alertmanager//). Redirecting to the new page. + # Alertmanager ## Parameters diff --git a/docs/services/email.md b/docs/services/email.md index e3c4b7d9..6679c1dd 100644 --- a/docs/services/email.md +++ b/docs/services/email.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/email//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/email//). Redirecting to the new page. + # Email ## Parameters diff --git a/docs/services/github.md b/docs/services/github.md index 953e55bd..80c57651 100644 --- a/docs/services/github.md +++ b/docs/services/github.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/github//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/github//). Redirecting to the new page. + # GitHub ## Parameters diff --git a/docs/services/googlechat.md b/docs/services/googlechat.md index 04484691..9d03adef 100644 --- a/docs/services/googlechat.md +++ b/docs/services/googlechat.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/googlechat//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/googlechat//). Redirecting to the new page. + # Google Chat ## Parameters diff --git a/docs/services/grafana.md b/docs/services/grafana.md index ff567b71..8f9aeefd 100644 --- a/docs/services/grafana.md +++ b/docs/services/grafana.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/grafana//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/grafana//). Redirecting to the new page. + # Grafana To be able to create Grafana annotation with argocd-notifications you have to create an [API Key](https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-key) inside your [Grafana](https://grafana.com). diff --git a/docs/services/mattermost.md b/docs/services/mattermost.md index 98e0d0fd..c98b6811 100644 --- a/docs/services/mattermost.md +++ b/docs/services/mattermost.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/mattermost//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/mattermost//). Redirecting to the new page. + # Mattermost ## Parameters diff --git a/docs/services/opsgenie.md b/docs/services/opsgenie.md index 665d0081..12ee182d 100644 --- a/docs/services/opsgenie.md +++ b/docs/services/opsgenie.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/opsgenie//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/opsgenie//). Redirecting to the new page. + # Opsgenie To be able to send notifications with argocd-notifications you have to create an [API Integration](https://docs.opsgenie.com/docs/integrations-overview) inside your [Opsgenie Team](https://docs.opsgenie.com/docs/teams). diff --git a/docs/services/overview.md b/docs/services/overview.md index 15e674f6..f2296f1d 100644 --- a/docs/services/overview.md +++ b/docs/services/overview.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/overview//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/overview//). Redirecting to the new page. + The notification services represent integration with services such as slack, email or custom webhook. Services are configured in `argocd-notifications-cm` ConfigMap using `service..()` keys and might reference sensitive data from `argocd-notifications-secret` Secret. Following example demonstrates slack service configuration: diff --git a/docs/services/pushover.md b/docs/services/pushover.md index 37cb20b2..201a3abd 100644 --- a/docs/services/pushover.md +++ b/docs/services/pushover.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/pushover//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/pushover//). Redirecting to the new page. + # Pushover 1. Create an app at [pushover.net](https://pushover.net/apps/build). diff --git a/docs/services/rocketchat.md b/docs/services/rocketchat.md index 554f42a8..54c6aab7 100644 --- a/docs/services/rocketchat.md +++ b/docs/services/rocketchat.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/rocketchat//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/rocketchat//). Redirecting to the new page. + # Rocket.Chat ## Parameters diff --git a/docs/services/slack.md b/docs/services/slack.md index 6119a32a..21af354a 100644 --- a/docs/services/slack.md +++ b/docs/services/slack.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/slack//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/slack//). Redirecting to the new page. + # Slack If you want to send message using incoming webhook, you can use [webhook](./webhook.md#send-slack). diff --git a/docs/services/teams.md b/docs/services/teams.md index eb50f553..6287e550 100644 --- a/docs/services/teams.md +++ b/docs/services/teams.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/teams//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/teams//). Redirecting to the new page. + # Teams ## Parameters diff --git a/docs/services/telegram.md b/docs/services/telegram.md index 953c2a9f..b720e031 100644 --- a/docs/services/telegram.md +++ b/docs/services/telegram.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/telegram//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/telegram//). Redirecting to the new page. + # Telegram 1. Get an API token using [@Botfather](https://t.me/Botfather). diff --git a/docs/services/webhook.md b/docs/services/webhook.md index b6aee1ea..fdc5b3d5 100644 --- a/docs/services/webhook.md +++ b/docs/services/webhook.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/webhook//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/webhook//). Redirecting to the new page. + ## Configuration The webhook notification service allows sending a generic HTTP request using the templatized request body and URL. diff --git a/docs/subscriptions.md b/docs/subscriptions.md index 44c500ac..5da0ccf2 100644 --- a/docs/subscriptions.md +++ b/docs/subscriptions.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/subscriptions//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/subscriptions//). Redirecting to the new page. + The subscription to Argo CD application events can be defined using `notifications.argoproj.io/subscribe..: ` annotation. For example, the following annotation subscribes two Slack channels to notifications about every successful synchronization of the Argo CD application: diff --git a/docs/templates.md b/docs/templates.md index ccbf510a..2981b7bc 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/templates//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/templates//). Redirecting to the new page. + The notification template is used to generate the notification content and configured in `argocd-notifications-cm` ConfigMap. The template is leveraging [html/template](https://golang.org/pkg/html/template/) golang package and allow to customize notification message. Templates are meant to be reusable and can be referenced by multiple triggers. diff --git a/docs/triggers.md b/docs/triggers.md index 482408f7..e687b9ba 100644 --- a/docs/triggers.md +++ b/docs/triggers.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/triggers//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/triggers//). Redirecting to the new page. + The trigger defines the condition when the notification should be sent. The definition includes name, condition and notification templates reference. The condition is a predicate expression that returns true if the notification should be sent. The trigger condition evaluation is powered by [antonmedv/expr](https://github.com/antonmedv/expr). diff --git a/docs/troubleshooting-commands.md b/docs/troubleshooting-commands.md index 42b89c7e..ca1105e9 100644 --- a/docs/troubleshooting-commands.md +++ b/docs/troubleshooting-commands.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-commands//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-commands//). Redirecting to the new page. + ## argocd-notifications template get Prints information about configured templates diff --git a/docs/troubleshooting-errors.md b/docs/troubleshooting-errors.md index c46d4c47..4861694b 100644 --- a/docs/troubleshooting-errors.md +++ b/docs/troubleshooting-errors.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-errors//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-errors//). Redirecting to the new page. + ## Failed to parse new settings ### error converting YAML to JSON diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index b0a98a8f..cd6d7f0f 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting//). Redirecting to the new page. + ## Troubleshooting The `argocd-notifications` binary includes a set of CLI commands that helps to configure the controller diff --git a/docs/upgrading/0.x-1.0.md b/docs/upgrading/0.x-1.0.md index 09f32873..81aadb6b 100644 --- a/docs/upgrading/0.x-1.0.md +++ b/docs/upgrading/0.x-1.0.md @@ -1,3 +1,8 @@ + + +!!! important "This page has moved" + This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page. + # v0.x to v1.0 The v1.0 release introduces a lot of new features and changes the format of configuration settings to improve usability. diff --git a/hack/set-docs-redirects.sh b/hack/set-docs-redirects.sh new file mode 100755 index 00000000..e3204840 --- /dev/null +++ b/hack/set-docs-redirects.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Notifications docs now live at https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/ +# This script adds redirects to the top of each Notifications doc to redirect to the new location. + +set -e pipefail + +new_docs_base_path="https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/" +new_docs_base_path_regex=$(echo "$new_docs_base_path" | sed 's/\//\\\//g') + +# Loop over files in the docs directory recursively. For each file, use sed to add the following redirect to the top: +# +# FILE_PATH should be the path to the file relative to the docs directory, stripped of the .md extension. + +files=$(find docs -type f -name '*.md') +for file in $files; do + file_path=$(echo "$file" | sed 's/^docs\///' | sed 's/\.md$/\//') + echo "Adding redirect to $file_path" + # If a redirect is already present at the top of the file, remove it. + sed '1s/ "$file.tmp" + mv "$file.tmp" "$file" + + # Add the new redirect. + # Default to an empty path. + file_path_plain="" + file_path_regex="" + if curl -s -o /dev/null -w "%{http_code}" "$new_docs_base_path$file_path" | grep -q 200; then + # If the destination path exists, use it. + file_path_plain="$file_path/" + file_path_regex=$(echo "$file_path" | sed 's/\//\\\//g') + else + echo "WARNING: $new_docs_base_path$file_path does not exist. Using empty path." + fi + + notice="!!! important \"This page has moved\"\n This page has moved to [$new_docs_base_path$file_path_plain]($new_docs_base_path$file_path_plain). Redirecting to the new page.\n" + + notice_regex=$(echo "$notice" | sed 's/\//\\\//g') + + sed "1s/^/\\n\\n$notice_regex\\n/" "$file" > "$file.tmp" + mv "$file.tmp" "$file" +done \ No newline at end of file