0

I have scheduled build pipeline thats autmatically triggered by changes in source code. Basically I want to know which changesets got into build before pipeline started to execute.

Mirza
  • 1

1 Answers1

0

You can use the predefined variable $(Build.SourceVersion) to get the changeset that triggering your pipeline. For detailed information, please refer to this document.

You can use this variable as part of the pipeline definition or value in the script that you want to run in pipeline. When the pipeline is triggered, this variable will be assigned by the system automatically.

Jane Ma-MSFT
  • 4,461
  • 1
  • 6
  • 12
  • It helped but is there a way to get all changsets IDs that happened between two builds. For example I built something with changset 1, then there were 3 changsets and since my build is scheduled it wont be triggered by every changset and Build.SourceVersion returns only the latest changset ID. Basically I want to get all those 3 changset IDs that happened between two builds. I know I can get changes between two builds via API but it doesnt return changeset ID – Mirza Aug 03 '22 at 06:29