Skip to content
Snippets Groups Projects
Commit f8a6622f authored by Johan Lorenzo's avatar Johan Lorenzo
Browse files

Bug 1782736 - part 3: Stop scheduling a decision task on Github Releases

now that Android releases are kicked off through ShipIt
parent a9d0f413
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,9 @@ 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"'
......@@ -34,7 +31,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"'
......@@ -43,7 +40,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"'
......@@ -58,11 +55,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 ["cron", "action"]'
then: '${push.branch}'
$if: 'tasks_for in ["cron", "action"]'
then: '${push.branch}'
base_sha:
$if: 'tasks_for == "github-push"'
then: '${event.before}'
......@@ -77,16 +71,8 @@ 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 ["cron", "action"]'
then: '${push.revision}'
head_tag:
$if: 'tasks_for == "github-release"'
then: '${event.release.tag_name}'
else: ''
$if: 'tasks_for in ["cron", "action"]'
then: '${push.revision}'
ownTaskId:
$if: '"github" in tasks_for'
then: {$eval: as_slugid("decision_task")}
......@@ -98,21 +84,15 @@ 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"]
|| (tasks_for == "github-pull-request" && pullRequestAction in ["opened", "reopened", "synchronize"])
|| (tasks_for == "github-push" && head_branch[:10] != "refs/tags/" && head_branch != "staging.tmp" && head_branch != "trying.tmp") && (head_branch[:8] != "mergify/")
|| (tasks_for == "github-release" && releaseAction == "published" && ownerEmail[:21] != "moz-releng-automation")
then:
$let:
level:
$if: 'tasks_for in ["github-push", "github-release", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/firefox-android"'
$if: 'tasks_for in ["github-push", "action", "cron"] && repoUrl == "https://github.com/mozilla-mobile/firefox-android"'
then: '3'
else: '1'
......@@ -138,7 +118,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'
......@@ -194,16 +174,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
......@@ -219,7 +195,6 @@ tasks:
MOBILE_HEAD_REPOSITORY: '${repoUrl}'
MOBILE_HEAD_REF: '${head_branch}'
MOBILE_HEAD_REV: '${head_sha}'
MOBILE_HEAD_TAG: '${head_tag}'
MOBILE_PIP_REQUIREMENTS: taskcluster/requirements.txt
MOBILE_REPOSITORY_TYPE: git
MOZ_AUTOMATION: "1"
......@@ -274,7 +249,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}
......@@ -303,18 +277,14 @@ tasks:
then:
symbol: D
else:
$if: 'tasks_for == "github-release"'
$if: 'tasks_for == "action"'
then:
symbol: 'ship_android_components'
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}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment