1

I want to return the results from a GIT command in my TeamCity build log. Unfortunately, I cannot using GIT commands within the Build Steps as the commands are not recognized. Any idea how I can return the results on my GIT command? Preferably, I would like to be able to pass the results to a parameter.

FYI, the git command I am using is to return the latest merged pull requests;

git log --grep="Merge pull request #[0-9]\+" --pretty=oneline -1

1 Answer 1

3

You need to select "Always checkout files on agent" in a Version Control Settings page. This requires you to install git on the agents.

Unlike server checkout, Agent checkout creates all the necessary VCS-specific folders (e.g. .git) and makes it possible to run git commands.

More details could be found in TeamCity documentation on VCS Checkout Mode.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.