You need to use two steps. One with codefresh cli and cf_export to create an environment variable with the result. And one with slack that uses the result
Here is the idea (just pseudocode)
version: '1.0'
steps:
allure_link_fetch:
title: Getting Test URL
image: codefresh/cli
commands:
- 'TEST_URL =$(codefresh get annotation ...)
- cf_export TEST_URL
slack_notify:
title: Slack notify
stage: “slack notify”
type: slack-notifier
arguments:
SLACK_HOOK_URL: “${{SLACK_HOOK_URL}}”
SLACK_TEXT: “Test completed at $TEST_URL”
Does that help?