diff --git a/.taskcluster.yml b/.taskcluster.yml index a0c7f370b..022d2f3b7 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -8,7 +8,7 @@ tasks: - $let: taskgraph: branch: taskgraph - revision: 09d4c6dec78d17beb186eef1f79c1ab712ccc433 + revision: bb532a33ad32213f3a396346b26abd28fb87a975 trustDomain: mobile in: $let: @@ -77,6 +77,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")} @@ -186,6 +191,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} @@ -203,9 +209,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 @@ -248,6 +251,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} diff --git a/taskcluster/fenix_taskgraph/__init__.py b/taskcluster/fenix_taskgraph/__init__.py index 6ef3f07eb..7a6f6e098 100644 --- a/taskcluster/fenix_taskgraph/__init__.py +++ b/taskcluster/fenix_taskgraph/__init__.py @@ -24,7 +24,6 @@ def register(graph_config): """ _import_modules(["job", "worker_types", "routes", "target_tasks"]) extend_parameters_schema({ - Required("head_tag"): text_type, Required("pull_request_number"): Any(All(int, Range(min=1)), None), Required("release_type"): text_type, Required("release_version"): text_type, @@ -37,8 +36,7 @@ def _import_modules(modules): def get_decision_parameters(graph_config, parameters): - head_tag = os.environ.get("MOBILE_HEAD_TAG", "").decode('utf-8') - parameters["head_tag"] = head_tag + head_tag = parameters["head_tag"].decode("utf-8") parameters["release_type"] = _resolve_release_type(head_tag) parameters["release_version"] = read_version_file() if head_tag: