The documentation at https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&viewFallbackFrom=vsts states that System.DefinitionId is "The ID of the build pipeline." But that seems to be not working.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
go to Azure Pipelines and open the pipeline you want, and in the url you'll see the definition=382 (or any number you may have). If you look the github of this task, definition is an alias for pipeline.
@sandeepzgk Thank you for the feedback and @katlimruiz thanks for the input! are you still having this issue or does the commented solution answer it?
@sandeepzgk I'll be closing this issue if you don't have any more feedback. Feel free to open a new issue if the issue isn't resolved! Thank you again!
Most helpful comment
go to Azure Pipelines and open the pipeline you want, and in the url you'll see the definition=382 (or any number you may have). If you look the github of this task, definition is an alias for pipeline.