Skip to content

Commit 893acf5

Browse files
committed
Bug 1574666 - update to v1, use community-tc deployment
1 parent 6253115 commit 893acf5

File tree

2 files changed

+129
-201
lines changed

2 files changed

+129
-201
lines changed

.taskcluster.yml

Lines changed: 129 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,130 @@
1-
version: 0
2-
metadata:
3-
name: "taskcluster-lib-urls test"
4-
description: "Library for building taskcluster urls"
5-
owner: "{{ event.head.user.email }}"
6-
source: "{{ event.head.repo.url }}"
7-
1+
version: 1
2+
policy:
3+
pullRequests: public
84
tasks:
9-
- provisionerId: "{{ taskcluster.docker.provisionerId }}"
10-
workerType: "{{ taskcluster.docker.workerType }}"
11-
extra:
12-
github:
13-
env: true
14-
events:
15-
- pull_request.opened
16-
- pull_request.synchronize
17-
- pull_request.reopened
18-
- push
19-
payload:
20-
maxRunTime: 3600
21-
image: "node:10"
22-
command:
23-
- "/bin/bash"
24-
- "-lc"
25-
- "git clone {{event.head.repo.url}} repo && cd repo && git checkout {{event.head.sha}} && yarn install && yarn test"
26-
metadata:
27-
name: "taskcluster-lib-urls node.js test"
28-
description: "Library for building taskcluster urls"
29-
owner: "{{ event.head.user.email }}"
30-
source: "{{ event.head.repo.url }}"
31-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
32-
workerType: '{{ taskcluster.docker.workerType }}'
33-
extra:
34-
github:
35-
events:
36-
- push
37-
branches:
38-
- master
39-
scopes:
40-
- auth:aws-s3:read-write:taskcluster-raw-docs/taskcluster-lib-urls/
41-
payload:
42-
maxRunTime: 3600
43-
image: taskcluster/upload-project-docs:latest
44-
features:
45-
taskclusterProxy:
46-
true
47-
command:
48-
- /bin/bash
49-
- '--login'
50-
- '-cx'
51-
- |
52-
git clone {{event.head.repo.url}} repo
53-
cd repo
54-
git config advice.detachedHead false
55-
git checkout {{event.head.sha}}
56-
export DEBUG=* DOCS_PROJECT=taskcluster-lib-urls DOCS_TIER=libraries DOCS_FOLDER=docs DOCS_README=README.md
57-
upload-project-docs
58-
metadata:
59-
name: "taskcluster-lib-urls docs upload"
60-
description: "Upload documentation for this project"
61-
owner: '{{ event.head.user.email }}'
62-
source: '{{ event.head.repo.url }}'
63-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
64-
workerType: '{{ taskcluster.docker.workerType }}'
65-
extra:
66-
github:
67-
events:
68-
- pull_request.opened
69-
- pull_request.synchronize
70-
- pull_request.reopened
71-
- push
72-
payload:
73-
maxRunTime: 3600
74-
image: 'golang:1.10'
75-
command:
76-
- /bin/bash
77-
- '-c'
78-
- |
79-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.12.3 &&
80-
mkdir -p /go/src/github.com/taskcluster/taskcluster-lib-urls
81-
cd /go/src/github.com/taskcluster/taskcluster-lib-urls
82-
git clone {{event.head.repo.url}} .
83-
git config advice.detachedHead false
84-
git checkout {{event.head.sha}}
85-
go get -v -d -t ./...
86-
go test -v -race ./...
87-
golangci-lint run
88-
metadata:
89-
name: "taskcluster-lib-urls go test"
90-
description: Run library test suite - golang 1.10
91-
owner: '{{ event.head.user.email }}'
92-
source: '{{ event.head.repo.url }}'
93-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
94-
workerType: '{{ taskcluster.docker.workerType }}'
95-
extra:
96-
github:
97-
events:
98-
- pull_request.opened
99-
- pull_request.synchronize
100-
- pull_request.reopened
101-
- push
102-
payload:
103-
maxRunTime: 3600
104-
image: 'maven'
105-
command:
106-
- /bin/bash
107-
- '-c'
108-
- |
109-
git clone {{event.head.repo.url}} repo
110-
cd repo
111-
git config advice.detachedHead false
112-
git checkout {{event.head.sha}}
113-
mvn -X -e install
114-
metadata:
115-
name: taskcluster-lib-urls java test
116-
description: Run library test suite - java
117-
owner: '{{ event.head.user.email }}'
118-
source: '{{ event.head.repo.url }}'
119-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
120-
workerType: '{{ taskcluster.docker.workerType }}'
121-
extra:
122-
github:
123-
events:
124-
- pull_request.opened
125-
- pull_request.synchronize
126-
- pull_request.reopened
127-
- push
128-
payload:
129-
maxRunTime: 3600
130-
image: 'python:2.7'
131-
command:
132-
- /bin/bash
133-
- '-c'
134-
- |
135-
git clone {{event.head.repo.url}} repo
136-
cd repo
137-
git config advice.detachedHead false
138-
git checkout {{event.head.sha}}
139-
pip install tox
140-
tox -e py27
141-
metadata:
142-
name: "taskcluster-lib-urls python 2.7 test"
143-
description: Run library test suite - python2.7
144-
owner: '{{ event.head.user.email }}'
145-
source: '{{ event.head.repo.url }}'
146-
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
147-
workerType: '{{ taskcluster.docker.workerType }}'
148-
extra:
149-
github:
150-
events:
151-
- pull_request.opened
152-
- pull_request.synchronize
153-
- pull_request.reopened
154-
- push
155-
payload:
156-
maxRunTime: 3600
157-
image: 'python:3.6'
158-
command:
159-
- /bin/bash
160-
- '-c'
161-
- |
162-
git clone {{event.head.repo.url}} repo
163-
cd repo
164-
git config advice.detachedHead false
165-
git checkout {{event.head.sha}}
166-
pip install tox
167-
tox -e py36
168-
metadata:
169-
name: taskcluster-lib-urls python 3.6 test
170-
description: Run library test suite - python3.6
171-
owner: '{{ event.head.user.email }}'
172-
source: '{{ event.head.repo.url }}'
5+
$let:
6+
should_run:
7+
$if: 'tasks_for == "github-pull-request"'
8+
then: {$eval: 'event["action"] in ["opened", "reopened", "synchronize"]'}
9+
else: {$eval: 'tasks_for == "github-push"'}
10+
clone_url:
11+
$if: 'tasks_for == "github-pull-request"'
12+
then: ${event.pull_request.head.repo.clone_url}
13+
else: ${event.repository.clone_url}
14+
sha:
15+
$if: 'tasks_for == "github-pull-request"'
16+
then: ${event.pull_request.head.sha}
17+
else: ${event.after}
18+
in:
19+
- $if: should_run
20+
then:
21+
provisionerId: proj-taskcluster
22+
workerType: ci
23+
deadline: {$fromNow: '1 day'}
24+
payload:
25+
maxRunTime: 3600
26+
image: "node:10"
27+
command:
28+
- "/bin/bash"
29+
- "-lc"
30+
- "git clone ${clone_url} repo && cd repo && git checkout ${sha} && yarn install && yarn test"
31+
metadata:
32+
name: "taskcluster-lib-urls node.js test"
33+
description: "Library for building taskcluster urls"
34+
35+
source: ${clone_url}
36+
- $if: should_run
37+
then:
38+
provisionerId: proj-taskcluster
39+
workerType: ci
40+
deadline: {$fromNow: '1 day'}
41+
payload:
42+
maxRunTime: 3600
43+
image: 'golang:1.10'
44+
command:
45+
- /bin/bash
46+
- '-c'
47+
- |
48+
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.12.3 &&
49+
mkdir -p /go/src/github.com/taskcluster/taskcluster-lib-urls
50+
cd /go/src/github.com/taskcluster/taskcluster-lib-urls
51+
git clone ${clone_url} repo
52+
cd repo
53+
git config advice.detachedHead false
54+
git checkout ${sha}
55+
go get -v -d -t ./...
56+
go test -v -race ./...
57+
golangci-lint run
58+
metadata:
59+
name: "taskcluster-lib-urls go test"
60+
description: Run library test suite - golang 1.10
61+
62+
source: ${clone_url}
63+
- $if: should_run
64+
then:
65+
provisionerId: proj-taskcluster
66+
workerType: ci
67+
deadline: {$fromNow: '1 day'}
68+
payload:
69+
maxRunTime: 3600
70+
image: 'maven'
71+
command:
72+
- /bin/bash
73+
- '-c'
74+
- |
75+
git clone ${clone_url} repo
76+
cd repo
77+
git config advice.detachedHead false
78+
git checkout ${sha}
79+
mvn -X -e install
80+
metadata:
81+
name: taskcluster-lib-urls java test
82+
description: Run library test suite - java
83+
84+
source: ${clone_url}
85+
- $if: should_run
86+
then:
87+
provisionerId: proj-taskcluster
88+
workerType: ci
89+
deadline: {$fromNow: '1 day'}
90+
payload:
91+
maxRunTime: 3600
92+
image: 'python:2.7'
93+
command:
94+
- /bin/bash
95+
- '-c'
96+
- |
97+
git clone ${clone_url} repo
98+
cd repo
99+
git config advice.detachedHead false
100+
git checkout ${sha}
101+
pip install tox
102+
tox -e py27
103+
metadata:
104+
name: "taskcluster-lib-urls python 2.7 test"
105+
description: Run library test suite - python2.7
106+
107+
source: ${clone_url}
108+
- $if: should_run
109+
then:
110+
provisionerId: proj-taskcluster
111+
workerType: ci
112+
deadline: {$fromNow: '1 day'}
113+
payload:
114+
maxRunTime: 3600
115+
image: 'python:3.6'
116+
command:
117+
- /bin/bash
118+
- '-c'
119+
- |
120+
git clone ${clone_url} repo
121+
cd repo
122+
git config advice.detachedHead false
123+
git checkout ${sha}
124+
pip install tox
125+
tox -e py36
126+
metadata:
127+
name: taskcluster-lib-urls python 3.6 test
128+
description: Run library test suite - python3.6
129+
130+
source: ${clone_url}

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)