OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

Send LSP4IJ integration build results to Slack channel #759

Closed TrevCraw closed 1 month ago

TrevCraw commented 4 months ago

At the conclusion of each LSP4IJ integration build, a notification should be sent to Slack with the build status and a link to the build results and associated PR/branch.

Box note link for the Steps for adding secret : https://ibm.ent.box.com/notes/1552644894634

Rahul-Biju commented 4 months ago

Output:

When the build results are completed, we'll now receive notifications via Slack. The notification includes both Build results and status updates.

Screenshot 2024-06-04 at 6 55 52 PM Screenshot 2024-06-04 at 6 56 06 PM
vaisakhkannan commented 2 months ago

@TrevCraw As per changes I did recently , Github action looks like this https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/9956282591

We receive slack notification for build results for every PRs and Lsp4ij main branch

Screenshot 2024-07-16 at 6 14 31 PM

From the above example, we receive two slack notification

@TrevCraw Do we need another channel for getting build results or just continue to use lsp4ij-monitoring?

vaisakhkannan commented 2 months ago

Hi @TrevCraw,

As per our previous plan to get a single Slack notification for the entire Cron Job build, I have tried and tested it with a single open PR in the lsp4ij repo, and it worked as expected. However, when I checked with multiple open PRs, the results were overwritten each time a PR build was completed.

The value we get is only the last updated value since we are passing the value from the build.yaml file (a reusable workflow file). Therefore, we don't get all the values corresponding to the build status of each open PR. As a result, we can't confirm the exact result.

Documentation link: https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-outputs-from-a-reusable-workflow

For reference : https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/10146415319 https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/10146431737

I attempted to store values using artifacts, but it was not successful. Artifacts can be used to store values from multiple jobs within a single workflow build, but they cannot be used across multiple workflows (e.g., reusable workflows), nor can they be edited or updated across different builds of build.yaml(multiple PRs and multiple LTI tags). As a result, it did not succeed.

@TrevCraw , Can I send the build status to a Slack channel for every Cron jobs-build.yaml build(Not Push/PR builds)?