NextGen - how to use the slack plugin with multi-line output

In this article, we will explain how to be able to use the message output in the slack plugin with multiple lines:
After configuring the slack plugin in your pipeline:

Click “apply changes” and then go to Pipeline Studio and edit the key “template”:

              - step:
                  type: Plugin
                  name: Slack Message
                  identifier: Slack_Message
                    connectorRef: account.harnessImage
                    image: plugins/slack
                      webhook: CHAMGEME
                      channel: automation
                      template: |
                        Pipeline: <>  

                        Branch: <+codebase.branch>  

                        Usermail: <+codebase.gitUserEmail>  

                        Usergit: <+codebase.gitUser>

Salve e execute a pipeline.

In this simple example, you can see the output of the message with multiple lines:


1 Like