Commit 42a8136f authored by Johan Lorenzo's avatar Johan Lorenzo
Browse files

Bug 1589684 - Let taskgraph handle params["head_tag"]

parent 311864c2
......@@ -7,7 +7,7 @@ tasks:
- $let:
taskgraph:
branch: taskgraph
revision: 09d4c6dec78d17beb186eef1f79c1ab712ccc433
revision: a9a010487bf10fca6dc34ba53f40d34a8ab51fc0
trustDomain: mobile
in:
$let:
......@@ -80,6 +80,11 @@ tasks:
else:
$if: 'tasks_for in ["cron", "action"]'
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")}
......@@ -197,6 +202,7 @@ 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}
......@@ -214,9 +220,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
......@@ -259,6 +262,7 @@ 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}
......
......@@ -21,10 +21,6 @@ def register(graph_config):
_import_modules(["job", "worker_types", "target_tasks"])
_fill_treeherder_groups(graph_config)
extend_parameters_schema({
Required("head_tag"): basestring,
})
def _import_modules(modules):
for module in modules:
......@@ -40,7 +36,5 @@ def _fill_treeherder_groups(graph_config):
def get_decision_parameters(graph_config, parameters):
parameters["head_tag"] = os.environ.get("MOBILE_HEAD_TAG", "")
if parameters["tasks_for"] == "github-release":
parameters["target_tasks_method"] = "release"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment