I would like to personalize the instruction message of a Manual Intervention task in a Release Pipeline.
Right now the message is very simple, as you can see:
It just says "I need your intervention!".
Now I would like to add a dynamic value to it, taken from a json, an artifact, or generated by a script (Bash, Powershell or Python, for example).
I know I can set a Pipeline Variable and then add it to the instruction message but that is useless to me, because the value I need is stored on a json artifact.
Do you have any idea on how to add a variable to the instruction message? Thank you very much.
There are a couple of ways to set a Variable from a script using magic commands. A few people have also written extensions to do this:
From your own bash or powershell script you can also register a variable using magic log strings:
You can use existing script commands to read the json file and fetch the value. Here is an example of me doing something similar in GitHub Actions in a powershell script. While the syntax to register a variable is a little different, the concept of taking the variable value from somewhere and registering it as a variable is the same:
There are some specifics documented about naming ang encoding.
These examples are in YAML, since that's easier in StackOverflow, but you can take the script contents and use them 1-on-1 in the graphic release pipelines:
Pass a variable to a script task the safe way: