Unity Cloud Build API: Build to specific commit, not most recent commit?

Hey there!

I’m currently working on some automation for our production, and I’d like to do something that I’m not sure is possible.

Currently, we are using Plastic SCM and have connected it to Unity Cloud Build. (Our builds are currently failing right now, but that’s a separate topic ;)) I have the webhooks set up so that on a new check-in, we fire a webhook to our WordPress site. Then through some simple PHP script, we create a new post that outlines the current check-in: it looks like so.

And after this post is generated, we send an API call to Unity Cloud Build to generate a new build. Then, once the build completes, it updates a link on this page to the fresh build made on this current changeset. At least, that’s the plan anyway. Not quite fully functional yet.

The problem that I’ve run into is that Unity Cloud Build (free trial) seems to only queue one build max while one build is currently building. We do not need concurrent builds. However, we do need a build for every changeset. I see potential issues if we got 3 back-to-back check-ins. Take this example:

Check-in A: “Make super jump”
Building starts.
Check-in B: “Make rocket jump”
Build queued, build already in progress.
Check-in C: “Make galaxy jump”
ERROR: Build is already queued

Anytime I send a request to queue a new build when one is already queued, it returns an error. So then, when build A is done, does build B create from Check-in B or Check-in C? It was queued when Check-in B was sent in. However, Check-in C is the latest.

If UCB can only handle one queued build at a time, that’s fine. I can create an internal queue system on our WordPress site. All I want is the ability to create a build at a specific check-in, even if it isn’t the latest check-in.

Is this possible?

Hey just wanted to bump this thread. To restate, is there any way to tell UCB to build from a specific changeset rather than the “latest” changeset on the specified branch?

Hi @JustJunuh ! Unfortunately UCB can only build from the latest changeset at the moment.

Thanks for the reply! Are there any plans to support this feature? Or a roadmap? Thanks!

Is it do-able now ? Or will it be a feature in the futur ?

Cloud build shouldn’t/doesn’t need to make a build for every commits. Like if you just cleaned some comments there is no need for a cloud server to start consuming energy and build for 3 different platforms …

Hey @JustJunuh and @ABerlemont you should be able to do this now! We recently released this feature. See attached image. Let me know if that’s what you were referring to.

7652266--954250--upload_2021-11-12_13-24-15.png

3 Likes

THAT’S SO COOL. Thanks!!