Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design: Notifications #49

Closed
bobcatfish opened this issue Sep 16, 2018 · 8 comments
Closed

Design: Notifications #49

bobcatfish opened this issue Sep 16, 2018 · 8 comments
Assignees
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@bobcatfish
Copy link
Collaborator

The work for this task is to design this feature and present one or more proposals (before implementing).

Expected Behavior

In a many modern pipelines, we want to be able to

Requirements:

  • Must support: slack updates, email updates, github PR commenting
  • Should be possible to perform different actions on failure of a task or a pipeline, or success
  • Must be possible to provide required credentials/auth info

Possibly a notification could be a top level directive in both a Pipeline and a Task, e.g.:

kind: Pipeline
...
spec:
    tasks:
        - name: unit-test-kritis
          taskRef:
              name: make
          inputSourceBindings:
              - inputName: workspace
                sourceKey: kritis
          params:
              - name: makeTarget
                value: test
          notifications:
               failure:
                   ....
               success:
                  .....

Actual Behavior

In the current design, a user would have to implement this as a Task that knows how to report these notifications.

Additional Info

There is some potential overlap with #27 which is about executing Tasks conditionally.

@bobcatfish bobcatfish added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Sep 16, 2018
@nader-ziada
Copy link
Member

nader-ziada commented Sep 17, 2018

A small addition might be to add notification.always which will be trigger at the end irrespective of Task run exit code.
For example:

kind: Pipeline
...
spec:
    tasks:
        - name: unit-test-kritis
          taskRef:
              name: make
          inputSourceBindings:
              - inputName: workspace
                sourceKey: kritis
          params:
              - name: makeTarget
                value: test
          notifications:
               failure:
                   ....
               success:
                  .....
               always:
                  .....

Simple use case would updating PR/Slack with a message confirming a test run or an docker image upload.

@nader-ziada
Copy link
Member

/assign @pivotal-nader-ziada

@tanner-bruce
Copy link

It would also be nice if the pipeline itself could have a generic success/failure notification. Perhaps it could also be templated to accept the task that failed? Having to put notifications for each and every task can be tedious and lead to copy and paste mistakes. This is something that I find Concourse is lacking.

@afrittoli
Copy link
Member

/assign @afrittoli

@afrittoli
Copy link
Member

@bobcatfish bobcatfish removed the maybe-next-milestone For consideration when planning the next milestone label Sep 6, 2019
@afrittoli
Copy link
Member

@bobcatfish if thing we got enough input on the design doc now to close this issue and start prototyping - so I would close this one.

@bobcatfish
Copy link
Collaborator Author

Sound good to me @afrittoli !

@bobcatfish
Copy link
Collaborator Author

plz feel free to make a follow-up Issue to do POC and/or implement - we can add it to our 0.8 milestone!

pradeepitm12 pushed a commit to pradeepitm12/pipeline that referenced this issue Jan 28, 2021
This adds a cel interceptor, that uses a a CEL expression to filter request bodies.

This implements issue tektoncd#49.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

4 participants