示例#1
0
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "queue:*",
                "docker-worker:*",
                "scheduler:*",
                "project:releng:signing:format:gpg",
                "project:releng:signing:format:mar",
                "project:releng:signing:cert:release-signing",
                "docker-worker:feature:balrogVPNProxy"
            })
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path': 'releases/mozilla-beta',
            'signing_pvt_key': PVT_KEY_FILE,
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'en_US_config': {
                "platforms": {
                    "macosx64": {"unsigned_task_id": "xyz", "signed_task_id": "xyz"},
                    "win32": {"unsigned_task_id": "xyy", "signed_task_id": "xyy"},
                }
            },
        })
        self.graph = make_task_graph(**test_kwargs)
        self.generator_image = get_task_by_name(self.graph, "funsize_update_generator_image")
        self.funsize_balrog_image = get_task_by_name(self.graph, "funsize_balrog_image")
示例#2
0
    def generate_command_requirements_validator(self, platform):
        if platform == 'win32':
            buildername = "release-mozilla-beta_firefox_win32_l10n_repack_1_38.0_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 38.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        elif platform == 'macosx64':
            buildername = "release-mozilla-beta_firefox_macosx64_l10n_repack_1_37.0_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 37.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        @truth
        def validate_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return validate_command_requirements
    def generate_task_requires_validator(self):
        en_US_tmpl = "release-mozilla-beta_firefox_{}_complete_en-US_beetmover_candidates"
        en_US_partials_tmpl = "release-mozilla-beta_firefox_{}_partial_en-US_{}build{}_beetmover_candidates"
        l10n_tmpl = "release-mozilla-beta_firefox_{}_l10n_repack_beetmover_candidates_1"
        l10n_partials_tmpl = "release-mozilla-beta_firefox_{}_l10n_repack_partial_{}build{}_beetmover_candidates_1"
        requires = []
        for completes in (en_US_tmpl, l10n_tmpl):
            requires.extend([
                get_task_by_name(self.graph, completes.format(p))["taskId"]
                for p in ("macosx64", "win32")
            ])
        for partials in (en_US_partials_tmpl, l10n_partials_tmpl):
            requires.extend([
                get_task_by_name(self.graph, partials.format(platform, p_version, p_build_num))[
                    "taskId"]
                for platform in ("macosx64", "win32")
                for p_version, p_build_num in (('38.0', '1'), ('37.0', '2'))
            ])
        requires.append(get_task_by_name(self.graph, "release-mozilla-beta-firefox_chcksms")["taskId"])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_task_requires
    def generate_task_dependency_validator(self):
        en_US_tmpl = "release-beta_firefox_{}_complete_en-US_beetmover_candidates"
        en_US_partials_tmpl = "release-beta_firefox_{p}_partial_en-US_{v}build{n}_beetmover_candidates"
        l10n_tmpl = "release-beta_firefox_{}_l10n_repack_beetmover_candidates_1"
        l10n_partials_tmpl = "release-beta_firefox_{p}_l10n_repack_partial_{v}build{n}_beetmover_candidates_1"
        en_US_balrog_tmpl = "{p}_en-US_{v}build{n}_funsize_balrog_task"
        l10n_balrog_tmpl = "release-beta_firefox_{p}_l10n_repack_1_{v}_balrog_task"

        requires = []
        for completes in (en_US_tmpl, l10n_tmpl):
            requires.extend([
                get_task_by_name(self.graph, completes.format(p))["taskId"]
                for p in ("macosx64", "win32", "win64")
            ])
        for partials in (en_US_partials_tmpl, l10n_partials_tmpl, en_US_balrog_tmpl, l10n_balrog_tmpl):
            requires.extend([
                get_task_by_name(self.graph, partials.format(p=platform, v=p_version, n=p_build_num))["taskId"]
                for platform in ("macosx64", "win32", "win64")
                for p_version, p_build_num in (('38.0', '1'), ('37.0', '2'))
                ])
        requires.append(get_task_by_name(self.graph, "release-beta-firefox_updates")["taskId"])

        @truth
        def validate_task_dependencies(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_dependencies
    def generate_command_requirements_validator(self, platform):
        if platform == 'win32':
            buildername = "release-mozilla-beta_firefox_win32_l10n_repack_1_38.0_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 38.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        elif platform == 'macosx64':
            buildername = "release-mozilla-beta_firefox_macosx64_l10n_repack_1_37.0_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 37.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        @truth
        def validate_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return validate_command_requirements
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'push_to_candidates_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path:': 'mozilla/beta',
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': EN_US_CONFIG,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
        })
        self.graph = make_task_graph(**test_kwargs)

        self.tasks = {
            'win32': get_task_by_name(
                self.graph, "release-{}_{}_{}_partial_en-US_{}build{}_beetmover_candidates".format(
                    "mozilla-beta", "firefox", 'win32', "38.0", 1
                )
            ),
            'macosx64': get_task_by_name(
                self.graph, "release-{}_{}_{}_partial_en-US_{}build{}_beetmover_candidates".format(
                    "mozilla-beta", "firefox", 'macosx64', "37.0", 2
                )
            ),
        }
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'push_to_candidates_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path:': 'mozilla/beta',
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': EN_US_CONFIG,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
        })
        self.graph = make_task_graph(**test_kwargs)

        self.tasks = {
            'win32': get_task_by_name(
                self.graph, "release-{}_{}_{}_partial_en-US_{}build{}_beetmover_candidates".format(
                    "mozilla-beta", "firefox", 'win32', "38.0", 1
                )
            ),
            'macosx64': get_task_by_name(
                self.graph, "release-{}_{}_{}_partial_en-US_{}build{}_beetmover_candidates".format(
                    "mozilla-beta", "firefox", 'macosx64', "37.0", 2
                )
            ),
        }
示例#8
0
    def generate_task_dependency_validator(self):
        en_US_tmpl = "release-beta_firefox_{}_complete_en-US_beetmover_candidates"
        en_US_partials_tmpl = "release-beta_firefox_{p}_partial_en-US_{v}build{n}_beetmover_candidates"
        l10n_tmpl = "release-beta_firefox_{}_l10n_repack_beetmover_candidates_1"
        l10n_partials_tmpl = "release-beta_firefox_{p}_l10n_repack_partial_{v}build{n}_beetmover_candidates_1"
        en_US_balrog_tmpl = "{p}_en-US_{v}build{n}_funsize_balrog_task"
        l10n_balrog_tmpl = "release-beta_firefox_{p}_l10n_repack_1_{v}_balrog_task"

        requires = []
        for completes in (en_US_tmpl, l10n_tmpl):
            requires.extend([
                get_task_by_name(self.graph, completes.format(p))["taskId"]
                for p in ("macosx64", "win32", "win64")
            ])
        for partials in (en_US_partials_tmpl, l10n_partials_tmpl,
                         en_US_balrog_tmpl, l10n_balrog_tmpl):
            requires.extend([
                get_task_by_name(
                    self.graph,
                    partials.format(p=platform, v=p_version,
                                    n=p_build_num))["taskId"]
                for platform in ("macosx64", "win32", "win64")
                for p_version, p_build_num in (('38.0', '1'), ('37.0', '2'))
            ])
        requires.append(
            get_task_by_name(self.graph,
                             "release-beta-firefox_updates")["taskId"])

        @truth
        def validate_task_dependencies(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_dependencies
    def generate_task_requires_validator(self):
        en_US_tmpl = "release-mozilla-beta_firefox_{}_complete_en-US_beetmover_candidates"
        en_US_partials_tmpl = "release-mozilla-beta_firefox_{}_partial_en-US_{}build{}_beetmover_candidates"
        l10n_tmpl = "release-mozilla-beta_firefox_{}_l10n_repack_beetmover_candidates_1"
        l10n_partials_tmpl = "release-mozilla-beta_firefox_{}_l10n_repack_partial_{}build{}_beetmover_candidates_1"
        requires = []
        for completes in (en_US_tmpl, l10n_tmpl):
            requires.extend([
                get_task_by_name(self.graph, completes.format(p))["taskId"]
                for p in ("macosx64", "win32")
            ])
        for partials in (en_US_partials_tmpl, l10n_partials_tmpl):
            requires.extend([
                get_task_by_name(self.graph, partials.format(platform, p_version, p_build_num))[
                    "taskId"]
                for platform in ("macosx64", "win32")
                for p_version, p_build_num in (('38.0', '1'), ('37.0', '2'))
            ])
        requires.append(get_task_by_name(self.graph, "release-mozilla-beta-firefox_chcksms")["taskId"])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_task_requires
示例#10
0
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "docker-worker:image:taskcluster/builder:*",
                "queue:define-task:aws-provisioner-v1/gecko-3-b-linux",
                "queue:create-task:aws-provisioner-v1/gecko-3-b-linux",
                "queue:define-task:aws-provisioner-v1/build-c4-2xlarge",
                "queue:create-task:aws-provisioner-v1/build-c4-2xlarge",
                "project:releng:signing:format:gpg",
                "project:releng:signing:cert:release-signing",
            })
        }, extra=True, required=True)

        self.task_schema = Schema({
            'task': {
                'scopes': generate_scope_validator(scopes={
                    "queue:define-task:aws-provisioner-v1/gecko-3-b-linux",
                    "queue:create-task:aws-provisioner-v1/gecko-3-b-linux",
                    "queue:define-task:aws-provisioner-v1/build-c4-2xlarge",
                    "queue:create-task:aws-provisioner-v1/build-c4-2xlarge",
                }),
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
                'payload': {
                    'image': str,
                    'command': list,
                    'artifacts': dict,
                    'env': {
                        'VERSION': '42.0b2',
                    },
                }
            }
        }, extra=True, required=True)

        self.signing_task_schema = Schema({
            'task': {
                'scopes': generate_scope_validator(scopes={
                    "project:releng:signing:format:gpg",
                    "project:releng:signing:cert:release-signing",
                }),
                'provisionerId': 'signing-provisioner-v1',
                'workerType': 'signing-worker-v1',
                'payload': All(Length(1), {
                    'signingManifest': str,
                })
            }

        }, required=True, extra=True)

        test_kwargs = create_firefox_test_args({
            'snap_enabled': True,
            'en_US_config': EN_US_CONFIG,
            'signing_pvt_key': PVT_KEY_FILE,
        })

        self.graph = make_task_graph(**test_kwargs)

        self.task = get_task_by_name(self.graph, "foo_snap")
        self.signing_task = get_task_by_name(self.graph, "foo_snap_signing")
示例#11
0
    def setUp(self):
        self.task_schema = Schema(
            {
                'task': {
                    'provisionerId': 'aws-provisioner-v1',
                    'workerType': 'gecko-3-b-linux',
                    'extra': {
                        'build_props': {
                            'product': 'firefox',
                            'locales': ["de", "en-GB", "zh-TW"],
                            'branch': 'mozilla-beta',
                            'version': '42.0b2',
                            'revision': 'abcdef123456',
                            'platform': str,
                        }
                    }
                }
            },
            extra=True,
            required=True)

        test_kwargs = create_firefox_test_args({
            'push_to_candidates_enabled':
            True,
            'branch':
            'mozilla-beta',
            'repo_path':
            'releases/mozilla-beta',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'signing_pvt_key':
            PVT_KEY_FILE,
            'accepted_mar_channel_id':
            'firefox-mozilla-beta',
            'signing_cert':
            'dep',
            'moz_disable_mar_cert_verification':
            True,
            'en_US_config':
            EN_US_CONFIG,
            'l10n_config':
            self.l10n_config,
        })

        self.graph = make_task_graph(**test_kwargs)
        self.tasks = {
            'win32':
            get_task_by_name(
                self.graph,
                "release-{}_{}_{}_l10n_repack_beetmover_candidates_1".format(
                    "mozilla-beta", "firefox", 'win32')),
            'macosx64':
            get_task_by_name(
                self.graph,
                "release-{}_{}_{}_l10n_repack_beetmover_candidates_1".format(
                    "mozilla-beta", "firefox", 'macosx64')),
        }
示例#12
0
    def setUp(self):
        self.graph_schema = Schema(
            {
                'scopes':
                generate_scope_validator(
                    scopes={
                        "queue:*", "docker-worker:*", "scheduler:*",
                        "project:releng:signing:format:gpg",
                        "project:releng:signing:format:mar",
                        "project:releng:signing:cert:release-signing",
                        "docker-worker:feature:balrogVPNProxy"
                    })
            },
            extra=True,
            required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled':
            True,
            'branch':
            'mozilla-beta',
            'repo_path':
            'releases/mozilla-beta',
            'signing_pvt_key':
            PVT_KEY_FILE,
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'accepted_mar_channel_id':
            'firefox-mozilla-beta',
            'signing_cert':
            'dep',
            'moz_disable_mar_cert_verification':
            True,
            'en_US_config': {
                "platforms": {
                    "macosx64": {
                        "unsigned_task_id": "xyz",
                        "signed_task_id": "xyx",
                        "repackage_task_id": "xyx",
                        "repackage-signing_task_id": "xyy",
                        "ci_system": "bb"
                    },
                    "win32": {
                        "unsigned_task_id": "xyz",
                        "signed_task_id": "xyx",
                        "repackage_task_id": "xyx",
                        "repackage-signing_task_id": "xyx",
                        "ci_system": "tc"
                    },
                }
            },
        })
        self.graph = make_task_graph(**test_kwargs)
        self.generator_image = get_task_by_name(
            self.graph, "funsize_update_generator_image")
        self.funsize_balrog_image = get_task_by_name(self.graph,
                                                     "funsize_balrog_image")
    def generate_task_requires_validator(self):
        requires = [
            get_task_by_name(self.graph, "release-foo_firefox_push_to_releases")["taskId"],
            get_task_by_name(self.graph, "release-foo-firefox_partner_repacks_copy_to_releases")["taskId"],
        ]

        @truth
        def validate_task_requires(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_requires
示例#14
0
    def setUp(self):
        test_kwargs = create_firefox_test_args({
            'source_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'push_to_releases_automatic': True,
            'release_channels': ['foo', 'bar'],
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': EN_US_CONFIG,
        })
        self.graph = make_task_graph(**test_kwargs)

        self.push_to_mirrors = get_task_by_name(self.graph, "release-foo_firefox_push_to_releases")
        self.foo_source_signing_beet = get_task_by_name(self.graph, "foo_source_signing_beet")
        self.foo_source_beet = get_task_by_name(self.graph, "foo_source_beet")
示例#15
0
    def setUp(self):
        test_kwargs = create_firefox_test_args({
            'source_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'push_to_releases_automatic': True,
            'release_channels': ['foo', 'bar'],
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': EN_US_CONFIG,
        })
        self.graph = make_task_graph(**test_kwargs)

        self.push_to_mirrors = get_task_by_name(self.graph, "release-foo_firefox_push_to_releases")
        self.foo_source_signing_beet = get_task_by_name(self.graph, "foo_source_signing_beet")
        self.foo_source_beet = get_task_by_name(self.graph, "foo_source_beet")
    def generate_task_requires_validator(self):
        requires = [
            get_task_by_name(self.graph,
                             "release-foo_firefox_push_to_releases")["taskId"],
            get_task_by_name(
                self.graph,
                "release-foo-firefox_partner_repacks_copy_to_releases")
            ["taskId"],
        ]

        @truth
        def validate_task_requires(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_requires
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={'queue:task-priority:high'}),
        }, required=True, extra=True)

        self.human_task_schema = Schema({
            'task': {
                'provisionerId': 'null-provisioner',
                'workerType': 'human-decision',
            }
        }, required=True, extra=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'buildbot-bridge',
                'workerType': 'buildbot-bridge',
                'payload': {
                    'properties': {
                        'product': 'firefox',
                        'version': '42.0b2',
                        'build_number': 3,
                        'repo_path': 'releases/foo',
                        'script_repo_revision': 'abcd',
                        'revision': 'abcdef123456',
                        'tuxedo_server_url': 'https://bouncer.real.allizom.org/api',
                    }
                }
            }
        }, required=True, extra=True)

        test_kwargs = create_firefox_test_args({
            'postrelease_bouncer_aliases_enabled': True,
            'release_channels': ['foo'],
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': {
                "platforms": {
                    "macosx64": {},
                    "win32": {},
                    "win64": {},
                    "linux": {},
                    "linux64": {},
                }
            },
        })
        self.graph = make_task_graph(**test_kwargs)

        self.task = get_task_by_name(self.graph, "release-foo-firefox_bouncer_aliases")
        self.human_task = get_task_by_name(self.graph, "publish_release_human_decision")
    def generate_command_requirements_validator(self, platform):
        l10n_artifact_task = get_task_by_name(
            self.graph,
            "release-mozilla-beta_firefox_{}_l10n_repack_artifacts_1".format(platform)
        )

        task_id = l10n_artifact_task['taskId']

        @truth
        def verify_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            required_elements = (
                "--app-version 42.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--bucket fake_bucket",
                "--taskid {}".format(task_id),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return verify_command_requirements
示例#19
0
    def generate_command_requirements_validator(self, platform):
        l10n_artifact_task = get_task_by_name(
            self.graph,
            "release-mozilla-beta_firefox_{}_l10n_repack_artifacts_1".format(
                platform))

        task_id = l10n_artifact_task['taskId']

        @truth
        def verify_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            required_elements = (
                "--app-version 42.0",
                "--locale de --locale en-GB --locale zh-TW",
                "--bucket fake_bucket",
                "--taskid {}".format(task_id),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return verify_command_requirements
示例#20
0
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'provisionerId': 'buildbot-bridge',
                'workerType': 'buildbot-bridge',
                'payload': {
                    'properties': {
                        'balrog_api_root': 'https://balrog.real/api',
                        'channels': 'alpha, release-dev',
                    }
                }
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'release_channels': ['foo'],
            'final_verify_channels': ['foo'],
            'publish_to_balrog_channels': ["release-dev", "alpha"],
            'en_US_config': {
                "platforms": {
                    "macosx64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win32": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                }
            },
        })

        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_publish_balrog")
示例#21
0
 def setUp(self):
     self.task_schema = Schema({
         'task': {
             'provisionerId': 'buildbot-bridge',
             'workerType': 'buildbot-bridge',
             'payload': {
                 'properties': {
                     'CHANNEL': 'beta-cdntest'
                 }
             }
         }
     }, extra=True, required=True)
     test_args = create_firefox_test_args({
         'updates_enabled': True,
         'push_to_candidates_enabled': True,
         'push_to_releases_enabled': True,
         'update_verify_enabled': True,
         'updates_builder_enabled': True,
         'signing_pvt_key': PVT_KEY_FILE,
         'branch': 'beta',
         'release_channels': ['beta'],
         'final_verify_channels': ['beta'],
         'l10n_config': L10N_CONFIG,
         'en_US_config': EN_US_CONFIG,
         'uptake_monitoring_enabled': True,
         'accepted_mar_channel_id': 'firefox-mozilla-beta',
         'signing_cert': 'dep',
         'moz_disable_mar_cert_verification': True,
         'update_verify_channel': 'beta-cdntest',
         'update_verify_requires_cdn_push': True,
     })
     self.graph = make_task_graph(**test_args)
     self.task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_beta_3")
示例#22
0
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'workerType': 'gecko-3-b-linux',
                'provisionerId': 'aws-provisioner-v1',
                'extra': {
                    'l10n_changesets': 'ab cd\nef gh\nij kl\n',
                },
            },
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'source_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'push_to_releases_automatic': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'release_channels': ['foo', 'bar'],
            'partner_repacks_platforms': ['win32', 'linux'],
            'eme_free_repacks_platforms': ['win32', 'macosx64'],
            'sha1_repacks_platforms': ['win32'],
            'l10n_changesets': {"ab": "cd", "ef": "gh", "ij": "kl"},
            'en_US_config': {
                "platforms": {
                    "linux": {
                        "unsigned_task_id": "xyz", "signed_task_id": "xyx",
                        "ci_system": "tc"
                    },
                    "win32": {
                        "unsigned_task_id": "xyz", "signed_task_id": "xyx",
                        "repackage_task_id": "xyx",
                        "repackage-signing_task_id": "xyx", "ci_system": "tc"
                    },
                },
            },
            'l10n_config': {
                "platforms": {
                    "win32": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.exe",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },
                    "linux": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.tar.xz",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },

                },
                "changesets": {
                    "de": "default",
                    "en-GB": "default",
                    "zh-TW": "default",
                },
            },
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "foo_l10n_changeset")
示例#23
0
    def test_encryption(self):
        self.task_schema = Schema({
            'task': {
                'payload': {
                    'encryptedEnv': All(Length(2), [Match(r'^wcB')])  # Must have 2 elements, starting with wcB
                }
            }
        }, required=True, extra=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'repo_path': 'foo/bar',
            'branch': 'mozilla-beta',
            'signing_class': 'dep-signing',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'signing_pvt_key': PVT_KEY_FILE,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'en_US_config': {
                "platforms": {
                    "macosx64": {"unsigned_task_id": "xyz", "signed_task_id": "xyz"},
                    "win32": {"unsigned_task_id": "xyz", "signed_task_id": "xyz"},
                }
            },
        })

        graph = make_task_graph(**test_kwargs)
        do_common_assertions(graph)
        for p in ("win32", "macosx64"):
            for v in ("38.0build1", "37.0build2"):
                balrog = get_task_by_name(graph, "{}_en-US_{}_funsize_balrog_task".format(p, v))
                verify(balrog, self.task_schema)
示例#24
0
 def test_all_builders_exist(self):
     for p in ['win32', 'win64', 'macosx64']:
         for i in xrange(1, 7):  # test full chunk size
             builder_task = get_task_by_name(
                 self.graph,
                 "release-beta_firefox_%s_update_verify_beta_%s" % (p, i))
             verify(builder_task, self.builder_exists_schema)
 def setUp(self):
     self.task_schema = Schema({
         'task': {
             'provisionerId': 'buildbot-bridge',
             'workerType': 'buildbot-bridge',
             'payload': {
                 'properties': {
                     'CHANNEL': 'beta-cdntest'
                 }
             }
         }
     }, extra=True, required=True)
     test_args = create_firefox_test_args({
         'updates_enabled': True,
         'push_to_candidates_enabled': True,
         'push_to_releases_enabled': True,
         'update_verify_enabled': True,
         'updates_builder_enabled': True,
         'signing_pvt_key': PVT_KEY_FILE,
         'branch': 'beta',
         'release_channels': ['beta'],
         'final_verify_channels': ['beta'],
         'l10n_config': L10N_CONFIG,
         'en_US_config': EN_US_CONFIG,
         'uptake_monitoring_enabled': True,
         'accepted_mar_channel_id': 'firefox-mozilla-beta',
         'signing_cert': 'dep',
         'moz_disable_mar_cert_verification': True,
         'update_verify_channel': 'beta-cdntest',
         'update_verify_requires_cdn_push': True,
     })
     self.graph = make_task_graph(**test_args)
     self.task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_beta_3")
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "queue:task-priority:high",
                "queue:define-task:aws-provisioner-v1/gecko-3-b-linux",
                "queue:create-task:aws-provisioner-v1/gecko-3-b-linux",
            })
        }, required=True, extra=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
            }
        }, extra=True, required=True)

        self.human_task_schema = Schema({
            'task': {
                'provisionerId': 'null-provisioner',
                'workerType': 'human-decision',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'checksums_enabled': True,
            'updates_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path': 'releases/mozilla-beta',
            'signing_pvt_key': PVT_KEY_FILE,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'release_channels': ['beta', 'release'],
            'final_verify_channels': ['beta', 'release'],
            'partner_repacks_platforms': ['win32', 'macosx64'],
            'eme_free_repacks_platforms': ['win32', 'macosx64'],
            'sha1_repacks_platforms': ['win32'],
            'en_US_config': EN_US_CONFIG,
            'l10n_config': L10N_CONFIG,
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(
            self.graph, "release-{}_{}_push_to_releases".format("mozilla-beta", "firefox")
        )
        self.human_task = get_task_by_name(self.graph, self.human_task_name)
示例#27
0
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "queue:task-priority:high",
                "queue:define-task:aws-provisioner-v1/gecko-3-b-linux",
                "queue:create-task:aws-provisioner-v1/gecko-3-b-linux",
            })
        }, required=True, extra=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
            }
        }, extra=True, required=True)

        self.human_task_schema = Schema({
            'task': {
                'provisionerId': 'null-provisioner',
                'workerType': 'human-decision',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'checksums_enabled': True,
            'updates_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path': 'releases/mozilla-beta',
            'signing_pvt_key': PVT_KEY_FILE,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'release_channels': ['beta', 'release'],
            'final_verify_channels': ['beta', 'release'],
            'partner_repacks_platforms': ['win32', 'macosx64'],
            'eme_free_repacks_platforms': ['win32', 'macosx64'],
            'sha1_repacks_platforms': ['win32'],
            'en_US_config': EN_US_CONFIG,
            'l10n_config': L10N_CONFIG,
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(
            self.graph, "release-{}_{}_push_to_releases".format("mozilla-beta", "firefox")
        )
        self.human_task = get_task_by_name(self.graph, self.human_task_name)
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "queue:task-priority:high",
            })
        }, extra=True, required=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'buildbot-bridge',
                'workerType': 'buildbot-bridge',
                'payload': {
                    'properties': {
                        'next_version': '42.0b3',
                        'repo_path': 'releases/foo',
                        'script_repo_revision': 'abcd',
                    }
                }
            }
        }, extra=True, required=True)

        self.human_task_schema = Schema({
            'task': {
                'provisionerId': 'null-provisioner',
                'workerType': 'human-decision',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'bouncer_enabled': True,
            'postrelease_version_bump_enabled': True,
            'release_channels': ['foo'],
            'final_verify_channels': ['foo'],
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': {
                "platforms": {
                    "macosx64": {},
                    "win32": {},
                    "win64": {},
                    "linux": {},
                    "linux64": {},
                }
            },
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_version_bump")
        self.human_task = get_task_by_name(self.graph, "publish_release_human_decision")
示例#29
0
    def setUp(self):
        self.graph_schema = Schema(
            {
                'scopes':
                generate_scope_validator(scopes={'queue:task-priority:high'}),
            },
            extra=True,
            required=True)

        self.task_schema = Schema(
            {
                'task': {
                    'provisionerId': 'buildbot-bridge',
                    'workerType': 'buildbot-bridge',
                    'payload': {
                        'properties': {
                            'NO_BBCONFIG': '1',
                            'VERIFY_CONFIG': 'beta-firefox-win32.cfg',
                            'TOTAL_CHUNKS': '12',
                            'THIS_CHUNK': '3'
                        }
                    }
                }
            },
            extra=True,
            required=True)

        # Ensure the task exists, and is a dict
        self.builder_exists_schema = Schema(dict)

        test_args = create_firefox_test_args({
            'updates_enabled':
            True,
            'push_to_candidates_enabled':
            True,
            'update_verify_enabled':
            True,
            'updates_builder_enabled':
            True,
            'signing_pvt_key':
            PVT_KEY_FILE,
            'branch':
            'beta',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'l10n_config':
            L10N_CONFIG,
            'en_US_config':
            EN_US_CONFIG,
            'accepted_mar_channel_id':
            'firefox-mozilla-beta',
            'signing_cert':
            'dep',
            'moz_disable_mar_cert_verification':
            True,
        })
        self.graph = make_task_graph(**test_args)
        self.task = get_task_by_name(
            self.graph, "release-beta_firefox_win32_update_verify_beta_3")
    def generate_task_dependency_validator(self):
        requires = sorted([get_task_by_name(self.graph, "release-foo_firefox_push_to_releases")["taskId"]])

        @truth
        def validate_task_dependencies(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_dependencies
示例#31
0
    def generate_task_dependency_validator(self):
        tmpl = "release-foo_firefox_{p}_complete_en-US_beetmover_candidates"
        tmpl_partials = "release-foo_firefox_{p}_partial_en-US_{v}build{b}_beetmover_candidates"
        requires = [
            get_task_by_name(self.graph, tmpl.format(p=p))["taskId"]
            for p in ("linux64", "macosx64", "win64")
        ] + [
            get_task_by_name(self.graph, tmpl_partials.format(p=p, v=v, b=b))["taskId"]
            for p in ("linux64", "macosx64", "win64")
            for v, b in [("37.0", 2), ("38.0", 1)]
        ]

        @truth
        def validate_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_dependencies
    def generate_task_requires_validator(self):
        requires_sorted = sorted([get_task_by_name(self.graph, "release-foo-firefox_publish_balrog")["taskId"]])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == requires_sorted

        return validate_task_requires
    def generate_dependency_validator(self):
        requires = [get_task_by_name(self.graph, t)['taskId'] for t in self.upstream_dependencies]

        @truth
        def validate_partner_repack_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_partner_repack_dependencies
示例#34
0
    def generate_task_requires_validator(self):
        requires_sorted = sorted([get_task_by_name(self.graph, "release-foo-firefox_uptake_monitoring")["taskId"]])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == requires_sorted

        return validate_task_requires
示例#35
0
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={"queue:task-priority:high"})
        }, extra=True, required=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'buildbot-bridge',
                'workerType': 'buildbot-bridge',
                'payload': {
                    'properties': {
                        'repo_path': 'releases/foo',
                        'script_repo_revision': 'abcd',
                        'next_version': '42.0b3',
                    }
                }
            }
        }, extra=True, required=True)

        self.human_task_schema = Schema({
            'task': {
                'provisionerId': 'null-provisioner',
                'workerType': 'human-decision',
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'bouncer_enabled': True,
            'postrelease_mark_as_shipped_enabled': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'final_verify_channels': ['foo'],
            'release_channels': ['foo'],
            'en_US_config': {
                "platforms": {
                    "macosx64": {},
                    "win32": {},
                    "win64": {},
                    "linux": {},
                    "linux64": {},
                }
            },
        })
        self.graph = make_task_graph(**test_kwargs)

        self.task = get_task_by_name(self.graph, "release-foo-firefox_mark_as_shipped")
        self.human_task = get_task_by_name(self.graph, "publish_release_human_decision")
    def generate_task_dependency_validator(self):
        requires = [get_task_by_name(self.graph, "release-foo-firefox_uptake_monitoring")["taskId"]]

        @truth
        def validate_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_dependencies
示例#37
0
    def generate_task_dependency_validator(self):
        requires = [get_task_by_name(self.graph, "release-foo-firefox_chcksms")["taskId"]]

        @truth
        def validate_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_dependencies
示例#38
0
    def generate_task_requires_validator(self):
        requires_sorted = sorted([get_task_by_name(self.graph, "publish_release_human_decision")["taskId"]])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == requires_sorted

        return validate_task_requires
    def generate_not_required_validator(self):
        push_to_mirrors = get_task_by_name(self.graph, "release-foo_firefox_push_to_releases")

        @truth
        def validate_not_required_dependencies(task):
            return task['taskId'] not in push_to_mirrors['requires']

        return validate_not_required_dependencies
示例#40
0
    def setUp(self):
        self.graph_schema = Schema(
            {
                'scopes':
                generate_scope_validator(scopes={
                    "queue:task-priority:high",
                })
            },
            extra=True,
            required=True)

        self.task_schema = Schema(
            {
                'task': {
                    'provisionerId': 'buildbot-bridge',
                    'workerType': 'buildbot-bridge',
                    'payload': {
                        'properties': {
                            'repo_path': 'releases/foo',
                            'script_repo_revision': 'abcd',
                            'partial_versions': '37.0build2, 38.0build1',
                            'balrog_api_root': 'https://balrog.real/api',
                            'platforms':
                            'linux, linux64, macosx64, win32, win64',
                            'channels': 'bar, foo',
                        }
                    }
                }
            },
            extra=True,
            required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled':
            True,
            'bouncer_enabled':
            True,
            'push_to_candidates_enabled':
            True,
            'postrelease_version_bump_enabled':
            True,
            'updates_builder_enabled':
            True,
            'release_channels': ['foo', 'bar'],
            'final_verify_channels': ['foo', 'beta'],
            'signing_pvt_key':
            PVT_KEY_FILE,
            'accepted_mar_channel_id':
            'firefox-mozilla-beta',
            'signing_cert':
            'dep',
            'moz_disable_mar_cert_verification':
            True,
            'en_US_config':
            EN_US_CONFIG,
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_updates")
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-3-b-linux',
                'extra': {
                    'build_props': {
                        'product': 'firefox',
                        'locales': ["de", "en-GB", "zh-TW"],
                        'branch': 'mozilla-beta',
                        'version': '42.0b2',
                        'revision': 'abcdef123456',
                        'platform': str,
                    }
                }
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'push_to_candidates_enabled': True,
            'branch': 'mozilla-beta',
            'repo_path': 'releases/mozilla-beta',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'signing_pvt_key': PVT_KEY_FILE,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'en_US_config': EN_US_CONFIG,
            'l10n_config': self.l10n_config,
        })

        self.graph = make_task_graph(**test_kwargs)
        self.tasks = {
            'win32': get_task_by_name(
                self.graph, "release-{}_{}_{}_l10n_repack_beetmover_candidates_1".format("mozilla-beta",
                                                                                         "firefox",
                                                                                         'win32')
            ),
            'macosx64': get_task_by_name(
                self.graph, "release-{}_{}_{}_l10n_repack_beetmover_candidates_1".format("mozilla-beta",
                                                                                         "firefox",
                                                                                         'macosx64')
            ),
        }
    def generate_not_required_validator(self):
        push_to_mirrors = get_task_by_name(
            self.graph, "release-foo_firefox_push_to_releases")

        @truth
        def validate_not_required_dependencies(task):
            return task['taskId'] not in push_to_mirrors['requires']

        return validate_not_required_dependencies
示例#43
0
    def generate_task_dependency_validator(self):
        tmpl = "release-foo_firefox_{p}_complete_en-US_beetmover_candidates"
        tmpl_partials = "release-foo_firefox_{p}_partial_en-US_{v}build{b}_beetmover_candidates"
        requires = [
            get_task_by_name(self.graph, tmpl.format(p=p))["taskId"]
            for p in ("linux64", "macosx64", "win64")
        ] + [
            get_task_by_name(self.graph, tmpl_partials.format(p=p, v=v,
                                                              b=b))["taskId"]
            for p in ("linux64", "macosx64", "win64")
            for v, b in [("37.0", 2), ("38.0", 1)]
        ]

        @truth
        def validate_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_dependencies
示例#44
0
    def generate_task_dependency_validator(self):
        tmpl = "release-foo_firefox_{}_complete_en-US_beetmover_candidates"
        requires = [get_task_by_name(self.graph, tmpl.format(p))["taskId"] for p in ("linux", "linux64", "macosx64", "win32", "win64",)]

        @truth
        def validate_task_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_task_dependencies
    def generate_task_dependency_validator(self):
        requires = sorted([
            get_task_by_name(self.graph,
                             "release-foo_firefox_push_to_releases")["taskId"]
        ])

        @truth
        def validate_task_dependencies(task):
            return sorted(requires) == sorted(task['requires'])

        return validate_task_dependencies
    def generate_dependency_validator(self):
        requires = [
            get_task_by_name(self.graph, t)['taskId']
            for t in self.upstream_dependencies
        ]

        @truth
        def validate_partner_repack_dependencies(task):
            return sorted(task['requires']) == sorted(requires)

        return validate_partner_repack_dependencies
示例#47
0
    def generate_task_requires_validator(self):
        requires_sorted = sorted([
            get_task_by_name(
                self.graph,
                "release-foo-firefox_schedule_publishing_in_balrog")["taskId"]
        ])

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == requires_sorted

        return validate_task_requires
    def generate_task_requires_validator(self):
        requires_sorted = sorted(
            get_task_by_name(
                self.graph, "release-foo_firefox_{}_update_verify_foo_{}".
                format(platform, i))["taskId"] for i in range(1, 13)
            for platform in ('win32', 'win64', 'macosx64'))

        @truth
        def validate_task_requires(task):
            return sorted(task['requires']) == requires_sorted

        return validate_task_requires
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'workerType': 'gecko-3-b-linux',
                'provisionerId': 'aws-provisioner-v1',
                'extra': {
                    'l10n_changesets': 'ab cd\nef gh\nij kl\n',
                },
            },
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'source_enabled': True,
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'push_to_releases_automatic': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'release_channels': ['foo', 'bar'],
            'partner_repacks_platforms': ['win32', 'linux'],
            'eme_free_repacks_platforms': ['win32', 'macosx64'],
            'sha1_repacks_platforms': ['win32'],
            'l10n_changesets': {"ab": "cd", "ef": "gh", "ij": "kl"},
            'en_US_config': {
                "platforms": {
                    "linux": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win32": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                },
            },
            'l10n_config': {
                "platforms": {
                    "win32": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.exe",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },
                    "linux": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.tar.xz",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },

                },
                "changesets": {
                    "de": "default",
                    "en-GB": "default",
                    "zh-TW": "default",
                },
            },
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "foo_l10n_changeset")
    def setUp(self):
        self.graph_schema = Schema(
            {
                'scopes':
                generate_scope_validator(scopes={'queue:task-priority:high'})
            },
            extra=True,
            required=True)

        self.task_schema = Schema(
            {
                'task': {
                    'provisionerId': 'aws-provisioner-v1',
                    'workerType': 'b2gtest',
                    'payload': {
                        'image': Match(r'^rail/python-test-runner'),
                        'command': [str],
                        'env': dict,
                    }
                }
            },
            extra=True,
            required=True)

        test_kwargs = create_firefox_test_args({
            'push_to_releases_enabled':
            True,
            'release_channels': ['beta', 'release'],
            'final_verify_channels': ['beta', 'release'],
            'final_verify_platforms':
            ["macosx64", "win32", "win64", "linux", "linux64"],
            'signing_pvt_key':
            PVT_KEY_FILE,
            'accepted_mar_channel_id':
            'firefox-mozilla-beta',
            'signing_cert':
            'dep',
            'moz_disable_mar_cert_verification':
            True,
            'en_US_config':
            EN_US_CONFIG,
        })

        self.graph = make_task_graph(**test_kwargs)
        self.tasks = [
            get_task_by_name(self.graph,
                             "{chan}_final_verify".format(chan=chan))
            for chan in (
                'beta',
                'release',
            )
        ]
    def generate_command_requirements_validator(self, platform):
        # Command requirements for win32
        if platform == 'win32':
            buildername = "win32_en-US_38.0build1_funsize_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 38.0",
                "--locale en-US",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        # Command requirements for macosx64
        elif platform == 'macosx64':
            buildername = "macosx64_en-US_37.0build2_funsize_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 37.0",
                "--locale en-US",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        @truth
        def verify_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return verify_command_requirements
示例#52
0
    def generate_command_requirements_validator(self, platform):
        # Command requirements for win32
        if platform == 'win32':
            buildername = "win32_en-US_38.0build1_funsize_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 38.0",
                "--locale en-US",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        # Command requirements for macosx64
        elif platform == 'macosx64':
            buildername = "macosx64_en-US_37.0build2_funsize_signing_task"
            funsize_artifact = get_task_by_name(self.graph, buildername)

            required_elements = (
                "--partial-version 37.0",
                "--locale en-US",
                "--taskid {}".format(funsize_artifact['taskId']),
                "--platform {}".format(buildbot2ftp(platform)),
                "--version 42.0b2",
            )

        @truth
        def verify_command_requirements(task):
            command = ''.join(task['task']['payload']['command'])
            for element in required_elements:
                if element not in command:
                    return False
            else:
                return True

        return verify_command_requirements
示例#53
0
    def setUp(self):
        self.graph_schema = Schema({
            'scopes': generate_scope_validator(scopes={
                "queue:task-priority:high",
            })
        }, extra=True, required=True)

        self.task_schema = Schema({
            'task': {
                'provisionerId': 'buildbot-bridge',
                'workerType': 'buildbot-bridge',
                'payload': {
                    'properties': {
                        'repo_path': 'releases/foo',
                        'script_repo_revision': 'abcd',
                        'partial_versions': '37.0build2, 38.0build1',
                        'balrog_api_root': 'https://balrog.real/api',
                        'platforms': 'linux, linux64, macosx64, win32, win64',
                        'channels': 'bar, foo',
                    }
                }
            }
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'bouncer_enabled': True,
            'push_to_candidates_enabled': True,
            'postrelease_version_bump_enabled': True,
            'updates_builder_enabled': True,
            'release_channels': ['foo', 'bar'],
            'final_verify_channels': ['foo', 'beta'],
            'signing_pvt_key': PVT_KEY_FILE,
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'en_US_config': {
                'platforms': {
                    'macosx64': {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    'win32': {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    'win64': {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    'linux': {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    'linux64': {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                }
            }
        })
        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_updates")
    def test_multichannel(self):
        for chan in ["beta", "release"]:
            multichan_schema = Schema({
                'task': {
                    'provisionerId': 'buildbot-bridge',
                    'workerType': 'buildbot-bridge',
                    'payload': {
                        'properties': {
                            'VERIFY_CONFIG': "{chan}-firefox-win32.cfg".format(chan=chan),
                        }
                    }
                }
            }, extra=True, required=True)

            multichan_task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_{chan}_3".format(chan=chan))
            verify(multichan_task, multichan_schema, TestBB_UpdateVerifyMultiChannel.not_allowed)
示例#55
0
    def test_multichannel(self):
        for chan in ["beta", "release"]:
            multichan_schema = Schema({
                'task': {
                    'provisionerId': 'buildbot-bridge',
                    'workerType': 'buildbot-bridge',
                    'payload': {
                        'properties': {
                            'VERIFY_CONFIG': "{chan}-firefox-win32.cfg".format(chan=chan),
                        }
                    }
                }
            }, extra=True, required=True)

            multichan_task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_{chan}_3".format(chan=chan))
            verify(multichan_task, multichan_schema, TestBB_UpdateVerifyMultiChannel.not_allowed)
    def setUp(self):
        test_kwargs = create_firefox_test_args({
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'uptake_monitoring_enabled': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'uptake_monitoring_platforms': ["macosx64", "win32", "win64", "linux", "linux64"],
            'partner_repacks_platforms': [],
            'eme_free_repacks_platforms': [],
            'sha1_repacks_platforms': ['win32'],
            'release_channels': ['foo'],
            'final_verify_channels': ['foo'],
            'en_US_config': {
                "platforms": {
                    "macosx64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win32": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                }
            },
            'l10n_config': {
                "platforms": {
                    "win32": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.exe",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },
                    "linux64": {
                        "en_us_binary_url": "https://queue.taskcluster.net/something/firefox.tar.xz",
                        "mar_tools_url": "https://queue.taskcluster.net/something/",
                        "locales": ["de", "en-GB", "zh-TW"],
                        "chunks": 1,
                    },

                },
                "changesets": {
                    "de": "default",
                    "en-GB": "default",
                    "zh-TW": "default",
                },
            },
        })

        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_uptake_monitoring")
    def setUp(self):
        self.task_schema = Schema({
            'task': {
                'provisionerId': 'aws-provisioner-v1',
                'workerType': 'gecko-decision',
                'payload': {
                    'command': ['/bin/echo', 'Dummy task to tell pulse-notify to send an email'],
                },
                'metadata': {
                    'name': 'firefox email release-drivers foo',
                },
                'extra': {
                    'notifications': {
                        'task-completed': {
                            'subject': 'firefox foo 42.0b2 updates are available on the foo channel now <EOM>',
                            'message': 'firefox foo 42.0b2 updates are available on the foo channel now <EOM>',
                            'ids': ['release-drivers'],
                        },
                    },
                },
            },
        }, extra=True, required=True)

        test_kwargs = create_firefox_test_args({
            'push_to_candidates_enabled': True,
            'push_to_releases_enabled': True,
            'signing_pvt_key': PVT_KEY_FILE,
            'release_channels': ['foo'],
            'final_verify_channels': ['foo'],
            'publish_to_balrog_channels': ["release-dev", "alpha"],
            'accepted_mar_channel_id': 'firefox-mozilla-beta',
            'signing_cert': 'dep',
            'moz_disable_mar_cert_verification': True,
            'en_US_config': {
                "platforms": {
                    "macosx64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win32": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "win64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                    "linux64": {'signed_task_id': 'abc', 'unsigned_task_id': 'abc'},
                }
            },
        })

        self.graph = make_task_graph(**test_kwargs)
        self.task = get_task_by_name(self.graph, "release-foo-firefox_email_foo")