Help needed!! How to avoid injection in "-deployment"?
Closed this issue · 2 comments
MasilamaniSeenivasan commented
n3wt0n commented
Unfortunately there is no "direct way" to achieve that.
The way I've been doing it is checking on the Environment.Id
variable. This works because a deployment job should have a connected environment.
In you decorator YAML you can use something like this:
steps:
- ${{ if (eq(variables['Environment.Id'], '') ) }}:
- task:
[WHATEVER ELSE YOU HAVE]
Which basically injects the decorator only when the Environment is not set
MasilamaniSeenivasan commented
This helps. Thanks Davide.