0

I'm struggeling a bit with VSO / TFS and a powershell script I wrote to run some custom git commands to deploy to a staging environment using git remote.

It's basically working totally fine. the only thing is that VSO is marking the build as partially succeeded because of the build output. It seems like VSO is interpreting everything that gets returned by a process and has more than 5 lines of output is an error. Unfortunatelly git is returning 7 lines:

PS ...\myrepo...> git push test2 master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 261 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To ssh://deploy@myhost/var/repo/schimmel.git
74fe89d..efc5906  master -> master

And this is what I see in VSO

VSOBuild

This is how I run git from powershell during a preActionScript

$proc = Start-Process -FilePath $GitExe -ArgumentList $pushArgs -Wait -NoNewWindow -PassThru;
if($proc.ExitCode -ne 0){
    Write-Error "Git is having errors..."
    exit $proc.ExitCode
}

So the build is not failing because the ExitCode is 0 but it seems like its marking the build as partially succeeded because the output is too long.

1 Answer 1

2

Add "--quiet" to your Argument list to git push ?

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

1 Comment

It's not really much of an 'answer' but if it works, who cares :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.