|
|
|
@ -11,8 +11,6 @@ tasks:
|
|
|
|
|
revision: 0c5a68749f9a7672a7e56604b69a7bd41b036614
|
|
|
|
|
trustDomain: mobile
|
|
|
|
|
in:
|
|
|
|
|
$if: 'tasks_for in ["github-pull-request", "github-push", "action", "cron"]'
|
|
|
|
|
then:
|
|
|
|
|
$let:
|
|
|
|
|
# Github events have this stuff in different places...
|
|
|
|
|
ownerEmail:
|
|
|
|
@ -22,11 +20,14 @@ tasks:
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
|
then: '${event.pull_request.user.login}@users.noreply.github.com'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: '${event.sender.login}@users.noreply.github.com'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${tasks_for}@noreply.mozilla.org'
|
|
|
|
|
baseRepoUrl:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
then: '${event.repository.html_url}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -35,7 +36,7 @@ tasks:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${repository.url}'
|
|
|
|
|
repoUrl:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
then: '${event.repository.html_url}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -44,7 +45,7 @@ tasks:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${repository.url}'
|
|
|
|
|
project:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
then: '${event.repository.name}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -58,6 +59,9 @@ tasks:
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: ${event.ref}
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: '${event.release.target_commitish}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${push.branch}'
|
|
|
|
@ -67,6 +71,9 @@ tasks:
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
|
then: '${event.pull_request.head.sha}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: '${event.release.tag_name}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${push.revision}'
|
|
|
|
@ -77,6 +84,8 @@ tasks:
|
|
|
|
|
$if: 'tasks_for == "cron"'
|
|
|
|
|
then: '${ownTaskId}'
|
|
|
|
|
in:
|
|
|
|
|
$if: 'tasks_for in ["github-pull-request", "github-release", "action", "cron"] || tasks_for == "github-push" && head_branch[:10] != "refs/tags/"'
|
|
|
|
|
then:
|
|
|
|
|
$let:
|
|
|
|
|
level:
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/fenix"'
|
|
|
|
@ -101,7 +110,7 @@ tasks:
|
|
|
|
|
$merge:
|
|
|
|
|
- owner: "${ownerEmail}"
|
|
|
|
|
source: '${repoUrl}/raw/${head_sha}/.taskcluster.yml'
|
|
|
|
|
- $if: 'tasks_for in ["github-push", "github-pull-request"]'
|
|
|
|
|
- $if: 'tasks_for in ["github-push", "github-pull-request", "github-release"]'
|
|
|
|
|
then:
|
|
|
|
|
name: "Decision Task"
|
|
|
|
|
description: 'The task that creates all of the other tasks in the task graph'
|
|
|
|
@ -140,9 +149,6 @@ tasks:
|
|
|
|
|
then:
|
|
|
|
|
$let:
|
|
|
|
|
short_head_branch:
|
|
|
|
|
$if: 'head_branch[:10] == "refs/tags/"'
|
|
|
|
|
then: {$eval: 'head_branch[10:]'}
|
|
|
|
|
else:
|
|
|
|
|
$if: 'head_branch[:11] == "refs/heads/"'
|
|
|
|
|
then: {$eval: 'head_branch[11:]'}
|
|
|
|
|
else: ${head_branch}
|
|
|
|
@ -152,6 +158,10 @@ tasks:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
|
then:
|
|
|
|
|
- 'assume:repo:github.com/${event.pull_request.base.repo.full_name}:pull-request'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then:
|
|
|
|
|
- 'assume:repo:${repoUrl[8:]}:release'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
@ -190,6 +200,9 @@ tasks:
|
|
|
|
|
ACTION_TASK_ID: {$json: {$eval: 'taskId'}} # taskId of the target task (JSON-encoded)
|
|
|
|
|
ACTION_INPUT: {$json: {$eval: 'input'}}
|
|
|
|
|
ACTION_CALLBACK: '${action.cb_name}'
|
|
|
|
|
- $if: 'tasks_for == "github-release"'
|
|
|
|
|
then:
|
|
|
|
|
GIT_TAG: '${event.release.tag_name}'
|
|
|
|
|
features:
|
|
|
|
|
taskclusterProxy: true
|
|
|
|
|
chainOfTrust: true
|
|
|
|
@ -251,6 +264,10 @@ tasks:
|
|
|
|
|
- $if: 'tasks_for in ["github-push", "github-pull-request"]'
|
|
|
|
|
then:
|
|
|
|
|
symbol: D
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then:
|
|
|
|
|
symbol: 'ship_fenix'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|