Use steps on Hooks

I need to know if possible to actually run steps on hooks part on the pipeline I need to import and use some custom step at failure or completed pipeline, but following the documentation seems to be only possible to run freestyle steps.

 on_fail:
   steps: 
     SendToSlack:
       type: slack-notifier
       arguments:
         SLACK_HOOK_URL: '${{SLACK_WEBHOOK_URL}}'
         SLACK_TEXT: '${{SLACK_TEXT}}'
         SLACK_ATTACHMENTS: '${{SLACK_ATTACHMENTS}}'

it is now possible to use custom steps in hooks (both step and pipeline)

@laurent.rochette can you provide a working example or documentation for it, don’t sure about the issue asking syntax error asking for image

image

the image is required for a freestyle step so it feels like it does not recognize your custom step call.
Here is my code

version: "1.0"
hooks:
  on_fail:
    steps:
      slack_notification:
        type: slack-notifier
        arguments:
          MODE: text
          SLACK_HOOK_URL: https://hooks.slack.com/services/............
          SLACK_TEXT: "Pipeline *${{CF_PIPELINE_NAME}}* failed"
     
steps:
  build:
    image: alpine
    commands:
      - exit 1

That looks very similar to yours. I’m wondering if that feature is only for enterprise customers. Please send me your account name at laurent.rochette@Codefresh.io if you’re not comfortable sharing it here