Bug 1394026 - Make an interactive loaner action task for linux. r=dustin

MozReview-Commit-ID: 3Jbbo7VvuDl

--HG--
extra : rebase_source : 54987fb37aed814f9655062dba1939774535f496
This commit is contained in:
Brian Stack 2017-08-28 13:53:56 -07:00
Родитель 2de4e3eefb
Коммит b00e5eccd1
1 изменённых файлов: 52 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,52 @@
---
title: Create Loaner (Docker Worker Linux)
name: docker-worker-linux-loaner
description: >
Create a clone of the task for use in interactive tasks.
This does not update any dependencies or
cause any downstream tasks to be retriggered.
The new task will be altered to
* Set task.payload.features.interactive = true
* Strip task.payload.caches to avoid poisoning
* Ensures task.payload.maxRunTime is minimum of 180 minutes
* Strip task.routes to avoid side-effects
* Set the environment variable TASKCLUSTER_INTERACTIVE=true
order: 1
context:
- worker-implementation: docker-worker
os: linux
---
$merge:
- $map: {$eval: task}
each(s):
$if: '!(s.key in ["routes", "dependencies", "requires", "scopes", "payload"])'
then: {'${s.key}': {$eval: s.val}}
- {created: {$fromNow: ''}}
- {deadline: {$fromNow: 12 hours}}
- {expires: {$fromNow: 7 days}}
- scopes:
$map: {$eval: task.scopes}
each(scope):
$if: 'scope[:7] != "docker-worker:cache:"'
then: '${scope}'
- payload:
$merge:
- $map: {$eval: task.payload}
each(s):
$if: '!(s.key in ["artifacts", "cache"])'
then: {'${s.key}': {$eval: s.val}}
- maxRunTime: {$eval: 'max(task.payload.maxRunTime, 3 * 60 * 60)'}
features:
$merge:
- $if: '"features" in task.payload'
then:
$eval: task.payload.features
- interactive: true
env:
$merge:
- $if: '"env" in task.payload'
then:
$eval: task.payload.env
- TASKCLUSTER_INTERACTIVE: true