forked from mozilla-releng/redo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.taskcluster.yml
41 lines (41 loc) · 1.51 KB
/
.taskcluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: 1
policy:
pullRequests: public
tasks:
$let:
# Github events have this stuff in different places...
repo_url: {$if: 'tasks_for == "github-push"',
then: '${event.repository.clone_url}',
# Assume Pull Request
else: '${event.pull_request.head.repo.clone_url}'}
head_sha: {$if: 'tasks_for == "github-push"',
then: '${event.after}',
# Assume Pull Request
else: '${event.pull_request.head.sha}'}
owner_email: {$if: 'tasks_for == "github-push"',
then: '${event.pusher.email}',
# Assume Pull Request
else: '${event.pull_request.user.login}@users.noreply.github.com'}
in:
# map tox command -> docker image
$map: [['py27', 'python:2.7'], ['pypy', 'pypy:2'],
['py34', 'python:3.4'], ['py35', 'python:3.5'],
['py36', 'python:3.6'], ['py37', 'python:3.7']]
each(py):
taskId: "${as_slugid(py[0])}"
provisionerId: "aws-provisioner-v1"
workerType: "github-worker"
created: {$eval: 'now'}
deadline: {$fromNow: '1 hour'}
payload:
maxRunTime: 1200
image: {$eval: 'py[1]'}
command:
- "/bin/bash"
- "-c"
- "git clone ${repo_url} redo && cd redo && git checkout ${head_sha} && pip install tox && tox -e ${py[0]}"
metadata:
name: Redo Pull Request ${py[0]}
description: Pull Request ${py[0]}
owner: ${owner_email}
source: "${repo_url}"