Bug 1288742 - Increase expiration date of all gecko decision artifacts bar image context tar balls. r=dustin
Until now Gecko decision task artifacts would expire after a week. Unfortunately, some of these artifacts are
needed in order for Treeherder to determine which tasks it can schedule on a given push.
In this change, we're changing the expiration of all artifacts except those that are related to docker image
optimizations, which, are very large files and we only want to keep for a week.
MozReview-Commit-ID: 96ahyWmoI7W
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -31,17 +31,17 @@ scopes:
# - as_slugid: convert a label into a slugId
# - from_now: generate a timestamp at a fixed offset from now
tasks:
- taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
task:
created: '{{now}}'
deadline: '{{#from_now}}1 day{{/from_now}}'
- expires: '{{#from_now}}14 day{{/from_now}}'
+ expires: '{{#from_now}}365 day{{/from_now}}'
metadata:
owner: mozilla-taskcluster-maintenance@mozilla.com
source: {{{source}}}
name: "Gecko Decision Task"
description: |
The task that creates all of the other tasks in the task graph
workerType: "gecko-decision"
@@ -100,13 +100,17 @@ tasks:
command:
- /home/worker/bin/run-decision
artifacts:
'public':
type: 'directory'
path: '/home/worker/artifacts'
+ expires: '{{#from_now}}364 days{{/from_now}}'
+ 'public/docker_image_contexts':
+ type: 'directory'
+ path: '/home/worker/docker_image_contexts'
expires: '{{#from_now}}7 days{{/from_now}}'
extra:
treeherder:
symbol: D
--- a/taskcluster/taskgraph/task/docker_image.py
+++ b/taskcluster/taskgraph/task/docker_image.py
@@ -66,21 +66,23 @@ class DockerImageTask(base.Task):
context_path = os.path.join('testing', 'docker', image_name)
image_parameters = dict(parameters)
image_parameters['context_path'] = context_path
image_parameters['artifact_path'] = 'public/image.tar'
image_parameters['image_name'] = image_name
image_artifact_path = \
- "public/decision_task/image_contexts/{}/context.tar.gz".format(image_name)
+ "public/docker_image_contexts/{}/context.tar.gz".format(image_name)
if os.environ.get('TASK_ID'):
+ # We put image context tar balls in a different artifacts folder on the
+ # Gecko decision task in order to have longer expiration dates for smaller artifacts
destination = os.path.join(
os.environ['HOME'],
- "artifacts/decision_task/image_contexts/{}/context.tar.gz".format(image_name))
+ "docker_image_contexts/{}/context.tar.gz".format(image_name))
image_parameters['context_url'] = ARTIFACT_URL.format(
os.environ['TASK_ID'], image_artifact_path)
destination = os.path.abspath(destination)
if not os.path.exists(os.path.dirname(destination)):
os.makedirs(os.path.dirname(destination))
context_hash = create_context_tar(GECKO, context_path,