|
|
|
@ -25,11 +25,8 @@ 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'
|
|
|
|
|
baseRepoUrl:
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: '${event.repository.html_url}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -38,7 +35,7 @@ tasks:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${repository.url}'
|
|
|
|
|
repoUrl:
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: '${event.repository.html_url}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -47,7 +44,7 @@ tasks:
|
|
|
|
|
$if: 'tasks_for in ["cron", "action"]'
|
|
|
|
|
then: '${repository.url}'
|
|
|
|
|
project:
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release"]'
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: '${event.repository.name}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
@ -62,11 +59,8 @@ tasks:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: ${event.ref}
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: '${event.release.target_commitish}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for in ["action", "cron"]'
|
|
|
|
|
then: '${push.branch}'
|
|
|
|
|
$if: 'tasks_for in ["action", "cron"]'
|
|
|
|
|
then: '${push.branch}'
|
|
|
|
|
head_sha:
|
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
|
then: '${event.after}'
|
|
|
|
@ -74,17 +68,9 @@ tasks:
|
|
|
|
|
$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 ["action", "cron"]'
|
|
|
|
|
then: '${push.revision}'
|
|
|
|
|
$if: 'tasks_for in ["action", "cron"]'
|
|
|
|
|
then: '${push.revision}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
head_tag:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: '${event.release.tag_name}'
|
|
|
|
|
else: ''
|
|
|
|
|
ownTaskId:
|
|
|
|
|
$if: '"github" in tasks_for'
|
|
|
|
|
then: {$eval: as_slugid("decision_task")}
|
|
|
|
@ -95,10 +81,6 @@ tasks:
|
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
|
then: ${event.action}
|
|
|
|
|
else: 'UNDEFINED'
|
|
|
|
|
releaseAction:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
then: ${event.action}
|
|
|
|
|
else: 'UNDEFINED'
|
|
|
|
|
in:
|
|
|
|
|
$if: >
|
|
|
|
|
tasks_for in ["action", "cron"]
|
|
|
|
@ -107,7 +89,7 @@ tasks:
|
|
|
|
|
then:
|
|
|
|
|
$let:
|
|
|
|
|
level:
|
|
|
|
|
$if: 'tasks_for in ["github-push", "github-release", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/fenix"'
|
|
|
|
|
$if: 'tasks_for in ["github-push", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/fenix"'
|
|
|
|
|
then: '3'
|
|
|
|
|
else: '1'
|
|
|
|
|
|
|
|
|
@ -133,7 +115,7 @@ tasks:
|
|
|
|
|
$merge:
|
|
|
|
|
- owner: "${ownerEmail}"
|
|
|
|
|
source: '${repoUrl}/raw/${head_sha}/.taskcluster.yml'
|
|
|
|
|
- $if: 'tasks_for in ["github-push", "github-pull-request", "github-release"]'
|
|
|
|
|
- $if: 'tasks_for in ["github-push", "github-pull-request"]'
|
|
|
|
|
then:
|
|
|
|
|
name: "Decision Task"
|
|
|
|
|
description: 'The task that creates all of the other tasks in the task graph'
|
|
|
|
@ -191,16 +173,12 @@ tasks:
|
|
|
|
|
then:
|
|
|
|
|
- 'assume:repo:github.com/${event.pull_request.base.repo.full_name}:pull-request'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|
- 'assume:repo:${repoUrl[8:]}:release'
|
|
|
|
|
# when all actions are hooks, we can calculate this directly rather than using a variable
|
|
|
|
|
- '${action.repo_scope}'
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|
# when all actions are hooks, we can calculate this directly rather than using a variable
|
|
|
|
|
- '${action.repo_scope}'
|
|
|
|
|
else:
|
|
|
|
|
- 'assume:repo:${repoUrl[8:]}:cron:${cron.job_name}'
|
|
|
|
|
- 'assume:repo:${repoUrl[8:]}:cron:${cron.job_name}'
|
|
|
|
|
|
|
|
|
|
requires: all-completed
|
|
|
|
|
priority: lowest
|
|
|
|
@ -215,7 +193,6 @@ tasks:
|
|
|
|
|
MOBILE_HEAD_REPOSITORY: '${repoUrl}'
|
|
|
|
|
MOBILE_HEAD_REF: '${head_branch}'
|
|
|
|
|
MOBILE_HEAD_REV: '${head_sha}'
|
|
|
|
|
MOBILE_HEAD_TAG: '${head_tag}'
|
|
|
|
|
MOBILE_REPOSITORY_TYPE: git
|
|
|
|
|
TASKGRAPH_BASE_REPOSITORY: https://hg.mozilla.org/ci/taskgraph
|
|
|
|
|
TASKGRAPH_HEAD_REPOSITORY: https://hg.mozilla.org/ci/${taskgraph.branch}
|
|
|
|
@ -233,9 +210,6 @@ 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:
|
|
|
|
|
MOBILE_HEAD_TAG: '${event.release.tag_name}'
|
|
|
|
|
features:
|
|
|
|
|
taskclusterProxy: true
|
|
|
|
|
chainOfTrust: true
|
|
|
|
@ -280,7 +254,6 @@ tasks:
|
|
|
|
|
--head-repository="$MOBILE_HEAD_REPOSITORY"
|
|
|
|
|
--head-ref="$MOBILE_HEAD_REF"
|
|
|
|
|
--head-rev="$MOBILE_HEAD_REV"
|
|
|
|
|
--head-tag="$MOBILE_HEAD_TAG"
|
|
|
|
|
--repository-type="$MOBILE_REPOSITORY_TYPE"
|
|
|
|
|
--tasks-for='${tasks_for}'
|
|
|
|
|
${extraArgs}
|
|
|
|
@ -309,18 +282,14 @@ tasks:
|
|
|
|
|
then:
|
|
|
|
|
symbol: D
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "github-release"'
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|
symbol: 'ship_fenix'
|
|
|
|
|
groupName: 'action-callback'
|
|
|
|
|
groupSymbol: AC
|
|
|
|
|
symbol: "${action.symbol}"
|
|
|
|
|
else:
|
|
|
|
|
$if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|
groupName: 'action-callback'
|
|
|
|
|
groupSymbol: AC
|
|
|
|
|
symbol: "${action.symbol}"
|
|
|
|
|
else:
|
|
|
|
|
groupSymbol: cron
|
|
|
|
|
symbol: "${cron.job_symbol}"
|
|
|
|
|
groupSymbol: cron
|
|
|
|
|
symbol: "${cron.job_symbol}"
|
|
|
|
|
- $if: 'tasks_for == "action"'
|
|
|
|
|
then:
|
|
|
|
|
parent: '${action.taskGroupId}'
|
|
|
|
|