Build Id from queued build

Does the Id given to a queued build, always stay same, i.e. when it starts running, is the same id retained?

4 comments
Comment actions Permalink

Hi munawar,

Yes, the build id will remain the same from queue to completion. There is some information on working with the build id in our documentation here: https://www.jetbrains.com/help/teamcity/working-with-build-results.html#WorkingwithBuildResults-InternalBuildID

0
Comment actions Permalink

I'm not sure this is correct. I'm regularly getting errors from python scripts because my code expects the id in the build queue to match up with the id on the job.


Example line from queue:
<build id="29344331" buildTypeId="JobName" state="queued" branchName="&lt;default&gt;" defaultBranch="true" href="/httpAuth/app/rest/buildQueue/id:29344331" webUrl="teamcity_server.com/viewQueued.html?itemId=29344331" />

teamcity_server.com/viewQueued.html?itemId=29344331 redirects to teamcity_server.com/viewLog.html?buildId=29343680 . I am unable to find 29344331  in the list of params once the job finishes. The build.id is 29343680.

0
Comment actions Permalink

Hi,

 

if the build redirects to the new one, it's quite likely that the build was queued as 29344331 but the build queue optimizer determined that the build was identical to another one that was already on the queue and removed the last one to just run it once. You can find more information about this process here: https://www.jetbrains.com/help/teamcity/build-queue.html#Build+Queue+Optimization+by+TeamCity

0
Comment actions Permalink

Ah, thanks. That makes a lot of sense. All of the changed ids were from old builds.

0

Please sign in to leave a comment.