Retrieving all of the most recently failed builds from TeamCity via REST - rest

Basically, I would like details of all of the builds where:
it is the latest build
is has failed
I'm using TC 8.1, and looking at the API, you'd think that it would be as simple as:
guestAuth/app/rest/builds?locator=status:failure
but this seems to give you a list of any build that has ever failed. So if you have a configuration that failed 10 times last year, but hasn't failed since, you'll get the details of all 10 build instances that failed.
Even if I could just get the details of the latest build for each configuration, that would be a great start!

OK, so a possibly experimental, undocumented, but functional (at least for now) example:
app/rest/buildTypes?locator=paused:false&fields=buildType(id,name,projectId,builds($locator(status:failure,running:false,canceled:false,count:1),build(id,number,status,statusText)))

Related

VSO Release Management - Tests will not run

I have a VSO release management definition in which I'm deploying a cloud service and then running some tests. The deployment executes without issues, but then the tests don't run, I recieve the following message in the logs:
Warning: No test is available in My DLL Path. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
Now, the strange thing is that this release is triggered by a build, which runs exactly the same set of tests and they all run happily.
I've included a runsettings file specifying the framework version (based on some SO posts I found from a year ago with a similar issue) but its made no difference. Been messing with this for nearly 2 days now with no progress. Any suggestions happily accepted!
Arrrrgh! So it turns out, if I deleted the whole project, created it again and added my tests again, it just works. Gremlins apparently!
Admins, if this needs to be deleted, go ahead

Red gate DLM Automation binding error using VSTS

I'm using Red gate DLM Automation version 2 on VSTS. I installed DLM on the build server, it's fully licensed, and I have noth the build and release VSTS plugins installed. But now, when I perform a build on VSTS, I receive the following error message:
System.Management.Automation.CmdletInvocationException: A parameter cannot be found that matches parameter name 'transactionIsolationLevel'. ---> System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'transactionIsolationLevel'.
My initial guess is that I have a version conflict between some Red Gate PowerShell libraries, but I cannot find any further information on this error.The build server is running PowerShell v4. The SQL code being built does not have any references to "transaction isolation" in it, but I don't think that's the problem. I have completed successful builds on this VSTS server in the past and am now confused what caused this error to start appearing.
Thank you!
You need at least 2.0.3 of the DLMA install on the local agent to work with the VSTS plugin - we added the Transaction Isolation Level option very recently, and VSTS auto-updates, but the DLMA install doesn't.
Sorry about that - we are looking into better update / communication mechanisms to keep these things in sync in future (or at least tell you what the problem is) but aren't quite there yet.
If you're still having trouble after updating the DLMA install on the local agent, please do get in touch via support#red-gate.com and we'll sort it out for you.

Inconsistent build failure in Hudson due to grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT

My application is developed in Grails 2.4.4. It uses MongoDB-3.0.2 plugin. I use Hudson as my CI system.
Sometimes when the job in hudson tries to build the application war, I get the below error.
Error | Resolve error obtaining dependencies: Failed to read artifact
descriptor for
org.grails:grails-datastore-gorm-plugin-support:jar:3.1.3.BUILD-SNAPSHOT
(Use --stacktrace to see the full trace)
It doesn't happen all the time. Many times the war was built successfully. Recently I am facing this problem more frequently.
In one of the question similar to this this, someone has suggested to change the Snapshot version to Release version. I tried it but didn't help me.
I also faced this problem in dev environment few times.
Can anyone let me know what could be the issuse? Could it be connectivity problem between the repository and my system?
Our SSL certificate expired this morning. We are working to get it addressed. An option to use as a workaround would be to use http instead of https. See comments at https://github.com/grails/grails-core/issues/9200.
The process is almost complete to get the new cert in place. Sorry for the trouble.

codename one build on netbeans 7.1

I have been trying to build an ios app for quite some time now. I did all the certificate provisioning etc. The problem is that whenever I send the build from netbeans to CN1 build-server it tells me that "you might have ran out of builds"... Mind you, I have only done less than 10 and only 3 of them are iphone (which failed). I know there is also a subscription to this, but I am also aware that there is a free subscription which allows a couple of builds. Is there a way I can fix this build problem. (see the output below)
Sending build request to the server, notice that the build might take a while to complete!
C:\TrueMobile\BeCorrect_\build.xml:82: Failed to upload to server. Its possible you ran out of builds. Please check http://www.codenameone.com/build-server.html
BUILD FAILED (total time: 2 seconds)
iOS builds take up more build credits than other platforms since they take up considerably more server resources. Hosting on a Mac is required (which is REALLY expensive) and the build itself is quite long which delays concurrent builds.
You get unlimited builds for 9USD per month or you can wait for next month and you will get 100 build credits again (iOS takes up 20 the other platforms take up 1).
Alternatively you can get unlimited builds for free by following the instructions here.

TestFixtureSetUp failed occasionally while running through cc.net

I am running nightly builds using cc.net 1.4.2. I am also using nunit2.4.8. If I force the build manually it works fine but most of my nightly schduled builds fails saying testfixture setup failed. Is this some bug in nunit2.4.8 or something othert thing as I cant find out the reason
Is it the same cc.net project being forced that is scheduled to run nightly? If not, there may be a difference in how they are configured. If they are the same, I would suggest adding some logging to the test fixture setup code to see if you can track down the problem. Perhaps there is a nightly task running on the server (backup or virus scan perhaps) that is causing the issue. Another possibility is a task running on another server (taking a database offline for example.) I don't believe this is a bug in NUnit.