From 48eb4167212f203efeaf71370c6a020e7189b48d Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Thu, 20 Jul 2023 17:35:24 +0200 Subject: [PATCH] fix(mattermost): add github debug link if any --- docs/advanced/features.md | 2 +- plugins/contrib/post-deploy/notify-mattermost.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/advanced/features.md b/docs/advanced/features.md index cb1df8b6be..5645ace62f 100644 --- a/docs/advanced/features.md +++ b/docs/advanced/features.md @@ -52,5 +52,5 @@ See [Plugins details](./advanced/plugins.md) - on demand resource cleaner - ... - post-deploy plugins - - notify mattermost (coming soon) + - notify mattermost/slack - ... diff --git a/plugins/contrib/post-deploy/notify-mattermost.js b/plugins/contrib/post-deploy/notify-mattermost.js index 8bd5ad0d80..1ffeeee0aa 100644 --- a/plugins/contrib/post-deploy/notify-mattermost.js +++ b/plugins/contrib/post-deploy/notify-mattermost.js @@ -48,6 +48,12 @@ module.exports = async (manifests, options, context) => { deploymentMessage.push( new AggregateError(errors, "errors encountered during deployment").message ) + // if we're running through GitHub actions + if (process.env.GITHUB_JOB) { + deploymentMessage.push( + `🔎 ${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/jobs/${process.env.GITHUB_JOB}` + ) + } } await new Promise((resolve, reject) => {