Remove remnants of github-release support
https://github.com/mozilla-mobile/fenix/pull/22125 stopped listening to these events but the supporting code was still around.
This commit is contained in:
parent
ee458bd480
commit
220ec02c38
|
@ -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}'
|
||||
|
|
|
@ -28,7 +28,7 @@ job-template:
|
|||
signing-format: autograph_apk
|
||||
index:
|
||||
by-tasks-for:
|
||||
(action|cron|github-release):
|
||||
(action|cron):
|
||||
by-build-type:
|
||||
(nightly|debug|nightly-simulation|beta|beta-mozillaonline|release|release-mozillaonline):
|
||||
type: signing
|
||||
|
|
|
@ -31,28 +31,3 @@ def get_decision_parameters(graph_config, parameters):
|
|||
pr_number = os.environ.get("MOBILE_PULL_REQUEST_NUMBER", None)
|
||||
parameters["pull_request_number"] = None if pr_number is None else int(pr_number)
|
||||
parameters.setdefault("next_version", None)
|
||||
|
||||
# TODO: Remove this block once github-releases are not supported anymore
|
||||
if parameters["tasks_for"] == "github-release":
|
||||
parameters["target_tasks_method"] = "release"
|
||||
|
||||
version_string = parameters["version"]
|
||||
version_in_file = read_version_file()
|
||||
if version_string != version_in_file:
|
||||
raise ValueError("Version given in tag ({}) does not match the one in version.txt ({})".format(version_string, version_in_file))
|
||||
|
||||
version = FenixVersion.parse(version_string)
|
||||
if version.is_beta:
|
||||
next_version = version.bump("beta_number")
|
||||
release_type = "beta"
|
||||
elif version.is_release:
|
||||
next_version = version.bump("patch_number")
|
||||
release_type = "release"
|
||||
elif version.is_release_candidate:
|
||||
next_version = version.bump("release_candidate_number")
|
||||
release_type = "release"
|
||||
else:
|
||||
raise ValueError("Unsupported version type: {}".format(version.version_type))
|
||||
|
||||
parameters["next_version"] = str(next_version)
|
||||
parameters["release_type"] = release_type
|
||||
|
|
|
@ -10,14 +10,8 @@ from taskgraph.target_tasks import _target_task
|
|||
@_target_task('release')
|
||||
def target_tasks_default(full_task_graph, parameters, graph_config):
|
||||
|
||||
# TODO Use shipping-phase once we retire github-releases
|
||||
# TODO Use shipping-phase
|
||||
def filter(task, parameters):
|
||||
# Mark-as-shipped is always red on github-release and it confuses people.
|
||||
# This task cannot be green if we kick off a release through github-releases, so
|
||||
# let's exlude that task there.
|
||||
if task.kind == "mark-as-shipped" and parameters["tasks_for"] == "github-release":
|
||||
return False
|
||||
|
||||
return task.attributes.get("release-type", "") == parameters["release_type"]
|
||||
|
||||
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
|
||||
|
|
|
@ -39,7 +39,7 @@ def set_worker_type(config, tasks):
|
|||
str(config.params["level"]) == "3"
|
||||
and task["attributes"]["build-type"]
|
||||
in ("nightly", "beta", "release", "android-test-nightly", "beta-mozillaonline", "release-mozillaonline")
|
||||
and config.params["tasks_for"] in ("cron", "github-release", "action")
|
||||
and config.params["tasks_for"] in ("cron", "action")
|
||||
):
|
||||
worker_type = "signing"
|
||||
task["worker-type"] = worker_type
|
||||
|
@ -52,7 +52,7 @@ def set_signing_type(config, tasks):
|
|||
signing_type = "dep-signing"
|
||||
if (
|
||||
str(config.params["level"]) == "3"
|
||||
and config.params["tasks_for"] in ("cron", "github-release", "action")
|
||||
and config.params["tasks_for"] in ("cron", "action")
|
||||
):
|
||||
if task["attributes"]["build-type"] in ("beta", "release"):
|
||||
signing_type = "fennec-production-signing"
|
||||
|
@ -67,7 +67,7 @@ def set_index(config, tasks):
|
|||
for task in tasks:
|
||||
index = {}
|
||||
if (
|
||||
config.params["tasks_for"] in ("cron", "github-release", "action")
|
||||
config.params["tasks_for"] in ("cron", "action")
|
||||
and task["attributes"]["build-type"]
|
||||
in ("nightly", "debut", "nightly-simulation", "beta", "release")
|
||||
):
|
||||
|
|
Loading…
Reference in New Issue
Block a user