From 5d1730b2a4c7655fc2aeb38f488fd1e5aaeed1b8 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 9 Oct 2019 21:01:10 +0000 Subject: [PATCH] Use the community-tc deployment for CI --- .taskcluster.yml | 57 +++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 93e4748..36c0164 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -1,30 +1,37 @@ -version: 0 -metadata: - name: "json-parameterization test" - description: "tests" - owner: "{{ event.head.user.email }}" - source: "{{ event.head.repo.url }}" - +version: 1 +policy: + pullRequests: public tasks: - - provisionerId: "{{ taskcluster.docker.provisionerId }}" - workerType: "{{ taskcluster.docker.workerType }}" - extra: - github: - env: true - events: - - pull_request.opened - - pull_request.synchronize - - pull_request.reopened - - push + $let: + 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.clone_url} + else: ${event.repository.clone_url} + in: + - provisionerId: 'proj-taskcluster' + workerType: 'ci' + created: {$fromNow: ''} + deadline: {$fromNow: '1 hour'} payload: maxRunTime: 3600 - image: "node:10" + image: node:10 command: - - "/bin/bash" - - "-lc" - - "git clone {{event.head.repo.url}} repo && cd repo && git checkout {{event.head.sha}} && yarn install && yarn test" + - /bin/bash + - '--login' + - '-c' + - >- + git clone ${repository} repo && + cd repo && + git config advice.detachedHead false && + git checkout ${head_rev} && + yarn && + yarn test metadata: - name: "json-parameterization test" - description: "Library for building taskcluster azure" - owner: "{{ event.head.user.email }}" - source: "{{ event.head.repo.url }}" + name: test + description: Tests for json-parameterization + owner: nobody@mozilla.com + source: https://github.com/taskcluster/json-parameterization