Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Support slack comments for builds #745

Merged
merged 25 commits into from
Oct 2, 2020
Merged

Conversation

v1v
Copy link
Member

@v1v v1v commented Sep 30, 2020

What does this PR do?

Enable slack comments as part of the notifyBuildStatus step

Why is it important?

Easy to provide context what's going on without the need to access to the CI or even GitHub.

This will enable us to send notifications when builds are failing in the master branch or any release branches.

Related issues

Caused by elastic/beats#21428

Tests

image

Follow ups

  • PRs and branches use different data structure, so far, this approach will only work for branches

@v1v v1v self-assigned this Sep 30, 2020
@v1v v1v added automation enhancement New feature or request labels Sep 30, 2020
@@ -0,0 +1,39 @@
<%if (statusSuccess) {%>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to be customised with the slack format

@apmmachine
Copy link
Contributor

apmmachine commented Sep 30, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #745 updated]

  • Start Time: 2020-10-02T09:00:41.722+0000

  • Duration: 7 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 814
Skipped 11
Total 825

Steps errors

Expand to view the steps failures

  • Name: Archive JUnit-formatted test results
    • Description: [2020-10-02T09:03:37.925Z] Recording test results
      [2020-10-02T09:03:38.255Z] Failed to read /var/li

    • Duration: 0 min 0 sec

    • Start Time: 2020-10-02T09:03:37.919+0000

    • log

@v1v v1v marked this pull request as ready for review October 1, 2020 16:24
@v1v v1v requested a review from a team October 1, 2020 16:24
Comment on lines 48 to 50
def slackChannel = args.containsKey('slackChannel') ? args.slackChannel : env.SLACK_CHANNEL
def slackAlways = args.containsKey('slackAlways') ? args.slackAlways : (currentBuild.currentResult != "SUCCESS")
def slackCredentials = args.containsKey('slackCredentials') ? args.slackCredentials : 'jenkins-slack-integration-token'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the examples in the header comments too?

v1v and others added 7 commits October 2, 2020 09:27
…ry into test/slackComment

* 'test/slackComment' of github.com:v1v/apm-pipeline-library:
  docs: update CHANGELOG.md
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release v1.1.143
  fix branch when on a PR basis (#737)
@v1v v1v merged commit 9c32a8a into elastic:master Oct 2, 2020
@v1v v1v deleted the test/slackComment branch October 2, 2020 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants