Skip to content

Commit 42a8136

Browse files
committed
Bug 1589684 - Let taskgraph handle params["head_tag"]
1 parent 311864c commit 42a8136

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.taskcluster.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tasks:
77
- $let:
88
taskgraph:
99
branch: taskgraph
10-
revision: 09d4c6dec78d17beb186eef1f79c1ab712ccc433
10+
revision: a9a010487bf10fca6dc34ba53f40d34a8ab51fc0
1111
trustDomain: mobile
1212
in:
1313
$let:
@@ -80,6 +80,11 @@ tasks:
8080
else:
8181
$if: 'tasks_for in ["cron", "action"]'
8282
then: '${push.revision}'
83+
head_tag:
84+
$if: 'tasks_for == "github-release"'
85+
then: '${event.release.tag_name}'
86+
else: ''
87+
8388
ownTaskId:
8489
$if: '"github" in tasks_for'
8590
then: {$eval: as_slugid("decision_task")}
@@ -197,6 +202,7 @@ tasks:
197202
MOBILE_HEAD_REPOSITORY: '${repoUrl}'
198203
MOBILE_HEAD_REF: '${head_branch}'
199204
MOBILE_HEAD_REV: '${head_sha}'
205+
MOBILE_HEAD_TAG: '${head_tag}'
200206
MOBILE_REPOSITORY_TYPE: git
201207
TASKGRAPH_BASE_REPOSITORY: https://hg.mozilla.org/ci/taskgraph
202208
TASKGRAPH_HEAD_REPOSITORY: https://hg.mozilla.org/ci/${taskgraph.branch}
@@ -214,9 +220,6 @@ tasks:
214220
ACTION_TASK_ID: {$json: {$eval: 'taskId'}} # taskId of the target task (JSON-encoded)
215221
ACTION_INPUT: {$json: {$eval: 'input'}}
216222
ACTION_CALLBACK: '${action.cb_name}'
217-
- $if: 'tasks_for == "github-release"'
218-
then:
219-
MOBILE_HEAD_TAG: '${event.release.tag_name}'
220223
features:
221224
taskclusterProxy: true
222225
chainOfTrust: true
@@ -259,6 +262,7 @@ tasks:
259262
--head-repository="$MOBILE_HEAD_REPOSITORY"
260263
--head-ref="$MOBILE_HEAD_REF"
261264
--head-rev="$MOBILE_HEAD_REV"
265+
--head-tag="$MOBILE_HEAD_TAG"
262266
--repository-type="$MOBILE_REPOSITORY_TYPE"
263267
--tasks-for='${tasks_for}'
264268
${extraArgs}

taskcluster/ac_taskgraph/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ def register(graph_config):
2121
_import_modules(["job", "worker_types", "target_tasks"])
2222
_fill_treeherder_groups(graph_config)
2323

24-
extend_parameters_schema({
25-
Required("head_tag"): basestring,
26-
})
27-
2824

2925
def _import_modules(modules):
3026
for module in modules:
@@ -40,7 +36,5 @@ def _fill_treeherder_groups(graph_config):
4036

4137

4238
def get_decision_parameters(graph_config, parameters):
43-
parameters["head_tag"] = os.environ.get("MOBILE_HEAD_TAG", "")
44-
4539
if parameters["tasks_for"] == "github-release":
4640
parameters["target_tasks_method"] = "release"

0 commit comments

Comments
 (0)