HOW to get get diff in teamcity?

Answered

I want to use lcov to get increament coverage. so need to get every build commits.  want to use some operation like git diff to get differernt files or commits in teamcity?Is there some environment var to get those?

0
1 comment

Hello,

You could use this build parameter:

system.teamcity.build.changedFiles.file

It is a String-typed parameter which holds an absolute path to a .txt file which contains all files that were changed. As a quick example, I have set up a command-line step which just prints out the file contents, and below is one file that was changed in the test run:

src/main/resources/teamcity_python/__init__api.mustache:ADDED:557791d0f8edd9bb78a0938533e840eb0318b68d

You could see the state of file (e.g. was it added, removed or changed), commit SHA and the relative path to file. Would this work for you?

0

Please sign in to leave a comment.