Commit a4256b11 authored by Dustin J. Mitchell's avatar Dustin J. Mitchell
Browse files

Bug 1547781 - expire try decision artifacts after 28 days r=Callek

This ensures that the artifacts an action task might consult will be gone at
the same time that the push's tasks expire.

Differential Revision: https://phabricator.services.mozilla.com/D29270

--HG--
extra : moz-landing-system : lando
parent 850305db
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -59,6 +59,11 @@ tasks:
        ownerEmail: {$if: '"@" in push.owner', then: '${push.owner}', else: '${push.owner}@noreply.mozilla.org'}
        # ensure there's no trailing `/` on the repo URL
        repoUrl: {$if: 'repository.url[-1] == "/"', then: {$eval: 'repository.url[:-1]'}, else: {$eval: 'repository.url'}}
        # expire try earlier than other branches
        expires:
          $if: 'repository.project == "try"'
          then: {$fromNow: '28 days'}
          else: {$fromNow: '1 year'}
      in:
        taskId: {$if: 'tasks_for != "action"', then: '${ownTaskId}'}
        taskGroupId:
@@ -71,7 +76,7 @@ tasks:

        created: {$fromNow: ''}
        deadline: {$fromNow: '1 day'}
        expires: {$fromNow: '1 year 1 second'} # 1 second so artifacts expire first, despite rounding errors
        expires: {$eval: 'expires'}
        metadata:
          $merge:
            - owner: "${ownerEmail}"
@@ -255,7 +260,7 @@ tasks:
            'public':
              type: 'directory'
              path: '/builds/worker/artifacts'
              expires: {$fromNow: '1 year'}
              expires: {$eval: expires}

        extra:
          $merge: