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: ...@@ -20,12 +20,9 @@ tasks:
else: else:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
then: '${event.pull_request.user.login}@users.noreply.github.com' 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: baseRepoUrl:
$if: 'tasks_for in ["github-push", "github-release"]' $if: 'tasks_for == "github-push"'
then: '${event.repository.html_url}' then: '${event.repository.html_url}'
else: else:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
...@@ -34,7 +31,7 @@ tasks: ...@@ -34,7 +31,7 @@ tasks:
$if: 'tasks_for in ["cron", "action"]' $if: 'tasks_for in ["cron", "action"]'
then: '${repository.url}' then: '${repository.url}'
repoUrl: repoUrl:
$if: 'tasks_for in ["github-push", "github-release"]' $if: 'tasks_for == "github-push"'
then: '${event.repository.html_url}' then: '${event.repository.html_url}'
else: else:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
...@@ -43,7 +40,7 @@ tasks: ...@@ -43,7 +40,7 @@ tasks:
$if: 'tasks_for in ["cron", "action"]' $if: 'tasks_for in ["cron", "action"]'
then: '${repository.url}' then: '${repository.url}'
project: project:
$if: 'tasks_for in ["github-push", "github-release"]' $if: 'tasks_for == "github-push"'
then: '${event.repository.name}' then: '${event.repository.name}'
else: else:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
...@@ -58,11 +55,8 @@ tasks: ...@@ -58,11 +55,8 @@ tasks:
$if: 'tasks_for == "github-push"' $if: 'tasks_for == "github-push"'
then: ${event.ref} then: ${event.ref}
else: else:
$if: 'tasks_for == "github-release"' $if: 'tasks_for in ["cron", "action"]'
then: '${event.release.target_commitish}' then: '${push.branch}'
else:
$if: 'tasks_for in ["cron", "action"]'
then: '${push.branch}'
base_sha: base_sha:
$if: 'tasks_for == "github-push"' $if: 'tasks_for == "github-push"'
then: '${event.before}' then: '${event.before}'
...@@ -77,16 +71,8 @@ tasks: ...@@ -77,16 +71,8 @@ tasks:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
then: '${event.pull_request.head.sha}' then: '${event.pull_request.head.sha}'
else: else:
$if: 'tasks_for == "github-release"' $if: 'tasks_for in ["cron", "action"]'
then: '${event.release.tag_name}' then: '${push.revision}'
else:
$if: 'tasks_for in ["cron", "action"]'
then: '${push.revision}'
head_tag:
$if: 'tasks_for == "github-release"'
then: '${event.release.tag_name}'
else: ''
ownTaskId: ownTaskId:
$if: '"github" in tasks_for' $if: '"github" in tasks_for'
then: {$eval: as_slugid("decision_task")} then: {$eval: as_slugid("decision_task")}
...@@ -98,21 +84,15 @@ tasks: ...@@ -98,21 +84,15 @@ tasks:
$if: 'tasks_for == "github-pull-request"' $if: 'tasks_for == "github-pull-request"'
then: ${event.action} then: ${event.action}
else: 'UNDEFINED' else: 'UNDEFINED'
releaseAction:
$if: 'tasks_for == "github-release"'
then: ${event.action}
else: 'UNDEFINED'
in: in:
$if: > $if: >
tasks_for in ["action", "cron"] tasks_for in ["action", "cron"]
|| (tasks_for == "github-pull-request" && pullRequestAction in ["opened", "reopened", "synchronize"]) || (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-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: then:
$let: $let:
level: 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' then: '3'
else: '1' else: '1'
...@@ -138,7 +118,7 @@ tasks: ...@@ -138,7 +118,7 @@ tasks:
$merge: $merge:
- owner: "${ownerEmail}" - owner: "${ownerEmail}"
source: '${repoUrl}/raw/${head_sha}/.taskcluster.yml' 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: then:
name: "Decision Task" name: "Decision Task"
description: 'The task that creates all of the other tasks in the task graph' description: 'The task that creates all of the other tasks in the task graph'
...@@ -194,16 +174,12 @@ tasks: ...@@ -194,16 +174,12 @@ tasks:
then: then:
- 'assume:repo:github.com/${event.pull_request.base.repo.full_name}:pull-request' - 'assume:repo:github.com/${event.pull_request.base.repo.full_name}:pull-request'
else: else:
$if: 'tasks_for == "github-release"' $if: 'tasks_for == "action"'
then: 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: else:
$if: 'tasks_for == "action"' - 'assume:repo:${repoUrl[8:]}:cron:${cron.job_name}'
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}'
requires: all-completed requires: all-completed
priority: lowest priority: lowest
...@@ -219,7 +195,6 @@ tasks: ...@@ -219,7 +195,6 @@ tasks:
MOBILE_HEAD_REPOSITORY: '${repoUrl}' MOBILE_HEAD_REPOSITORY: '${repoUrl}'
MOBILE_HEAD_REF: '${head_branch}' MOBILE_HEAD_REF: '${head_branch}'
MOBILE_HEAD_REV: '${head_sha}' MOBILE_HEAD_REV: '${head_sha}'
MOBILE_HEAD_TAG: '${head_tag}'
MOBILE_PIP_REQUIREMENTS: taskcluster/requirements.txt MOBILE_PIP_REQUIREMENTS: taskcluster/requirements.txt
MOBILE_REPOSITORY_TYPE: git MOBILE_REPOSITORY_TYPE: git
MOZ_AUTOMATION: "1" MOZ_AUTOMATION: "1"
...@@ -274,7 +249,6 @@ tasks: ...@@ -274,7 +249,6 @@ tasks:
--head-repository="$MOBILE_HEAD_REPOSITORY" --head-repository="$MOBILE_HEAD_REPOSITORY"
--head-ref="$MOBILE_HEAD_REF" --head-ref="$MOBILE_HEAD_REF"
--head-rev="$MOBILE_HEAD_REV" --head-rev="$MOBILE_HEAD_REV"
--head-tag="$MOBILE_HEAD_TAG"
--repository-type="$MOBILE_REPOSITORY_TYPE" --repository-type="$MOBILE_REPOSITORY_TYPE"
--tasks-for='${tasks_for}' --tasks-for='${tasks_for}'
${extraArgs} ${extraArgs}
...@@ -303,18 +277,14 @@ tasks: ...@@ -303,18 +277,14 @@ tasks:
then: then:
symbol: D symbol: D
else: else:
$if: 'tasks_for == "github-release"' $if: 'tasks_for == "action"'
then: then:
symbol: 'ship_android_components' groupName: 'action-callback'
groupSymbol: AC
symbol: "${action.symbol}"
else: else:
$if: 'tasks_for == "action"' groupSymbol: cron
then: symbol: "${cron.job_symbol}"
groupName: 'action-callback'
groupSymbol: AC
symbol: "${action.symbol}"
else:
groupSymbol: cron
symbol: "${cron.job_symbol}"
- $if: 'tasks_for == "action"' - $if: 'tasks_for == "action"'
then: then:
parent: '${action.taskGroupId}' 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