-
Notifications
You must be signed in to change notification settings - Fork 13
/
.taskcluster.yml
63 lines (63 loc) · 2.36 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: 1
policy:
pullRequests: public
tasks:
$let:
proj_name: "docker-exec-websocket-server"
head_rev:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.sha}
else: ${event.after}
repository:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
environments:
- node_image_tag: 16-bullseye
description: Run tests with node v16
- node_image_tag: 14-bullseye
description: Run tests with node v14
- node_image_tag: 12-bullseye
description: Run tests with node v12
- node_image_tag: "10"
description: Run tests with node v10 (unsupported)
- node_image_tag: current-bullseye
description: Run tests with current node version
in:
$if: tasks_for == "github-pull-request" && event["action"] in ["opened","reopened","synchronize"]
then:
$map: {$eval: environments}
each(env):
taskId: {$eval: as_slugid(proj_name + ":node:" + env.node_image_tag + ":tests")}
deadline:
$fromNow: 1 day
taskQueueId: proj-taskcluster/gw-ci-ubuntu-22-04
metadata:
name: node:${env.node_image_tag} tests
description: ${env.description}
owner: ${event.sender.login}@users.noreply.github.com
source: ${event.repository.url}
payload:
maxRunTime: 3600
env:
BUILDKIT_PROGRESS: plain # auto / tty is over-verbose
REPO_DIR: ${proj_name}
mounts:
- file: bin/docker-compose
content:
url: https://github.com/docker/compose/releases/download/v2.14.1/docker-compose-linux-x86_64
sha256: e0c916bd108c49830c7847e416787387398f97de8dda7c1c35dad59438692664
command:
-
- /bin/bash
- -vxec
- |
docker info
git --version
git clone --no-progress "${repository}" "$REPO_DIR"
cd "$REPO_DIR"
git config advice.detachedHead "false"
git checkout --no-progress "${head_rev}"
chmod a+x ../bin/docker-compose
../bin/docker-compose build --build-arg "NODE_VERSION=${env.node_image_tag}"
../bin/docker-compose run --rm --no-TTY test