What is the correct way to override values for a bitbucket pipeline anchor when inside a pipe? The use case is that I want slack notifications to be sent to the same channel with only the message variable different depending on where it is called.
Currently I have the following definition
definitions:
steps:
- step: &slack-alert
name: Slack alert
script:
- pipe: atlassian/slack-notify:0.2.0
variables:
WEBHOOK_URL: "https://hooks.slack.com/services/super/secret"
MESSAGE: Generic slack message from bitbucket
and the relevant step that calls it
- step:
<<: *slack-alert
name: "#deploystatus qa"
script:
- pipe: atlassian/slack-notify:0.2.0
variables:
MESSAGE: "Custom text for the qa (staging) environment\n<https://qa.google.com/|qa.google.com>"
The issue is that since the MESSAGE is not at the top-level tab (whereas name is), I need to specify additional info that, in theory, should be inherited from the definition.