Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Automatically delete old builds from Unity Cloud Build

Discussion in 'Unity Build Automation' started by coshea, May 10, 2022.

  1. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    317
    Hi

    Is there a way to automatically delete old builds via a setting in a build config or external script?

    We want to clear out old builds within a config after a certain period of time. This helps keep the data returned by the cloud build api cleaner and also saves spaces on your servers.

    Thanks
     
  2. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    429
    Hey Chris,

    Thanks for providing this great feedback. I agree this would be a very healthy feature for the service (and I appreciate your concern about our server space too!)

    I will pass this on to the development team.
     
  3. ThisIsNotMyName123

    ThisIsNotMyName123

    Joined:
    May 10, 2022
    Posts:
    45
    Is this not built into the system as a core feature? I am cursorily looking into Cloud Builds and was assuming this would be part of the basic feature set.
     
  4. ThisIsNotMyName123

    ThisIsNotMyName123

    Joined:
    May 10, 2022
    Posts:
    45
    @ollieblanks Can you confirm that this basic feature is not there yet, and if not when will it be added? Thank you.
     
  5. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    317
    Any news on this? Especially as storage costs are going up with this new pricing. Thanks
     
    Fangh and GabrielRos like this.
  6. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    248
    Or at least a way to filter by date. So we can select all build before a specific date and delete them.
    You cannot add a "you pay for the storage" and not give us a simple way to clean that storage
     
  7. brettkercher

    brettkercher

    Unity Technologies

    Joined:
    Mar 19, 2018
    Posts:
    3
    This is currently possible through the API. See the Delete artifacts for a batch of builds section of our API docs.

    For an example, do a POST request to "https://build-api.cloud.unity3d.com/api/v1/orgs/{ORG_ID}/projects/{PROJECT_ID}/artifacts/delete/?allWithExclusions=true"

    and in the body, add:

    Code (JavaScript):
    1. {
    2.     "excludedBuilds": [],
    3.     "filters": {},
    4.     "deleteOnOrBeforeDate": "2023-01-01T18:51:33.412Z"
    5. }
    This will delete every non-favorited build before January 1st 2023
     
    Benjamin-Gooding likes this.
  8. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    248
    with the API ?
    You mean something that the average Unity Game Developer doesn't know how to use ?

    Thank you for the info
     
  9. AlgoritcomDev

    AlgoritcomDev

    Joined:
    Aug 5, 2023
    Posts:
    7
    I agree this automatic deletion feature would be very helpful.
    Many times we do control builds we really don't want to keep.
    It would be useful if we could tag the ones we want to keep and the other ones be automatically deleted over time.
     
  10. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    354
    AlgoritcomDev likes this.