Beispiel #1
0
def step_impl_when_fsm_auto(context):
    service = "new_paasta_service"

    fake_args = mock.Mock(
        yelpsoa_config_root=context.fake_yelpsoa_configs,
        srvname=service,
        auto=True,
        port=None,
        team='paasta',
        description=None,
        external_link=None,
    )
    with contextlib.nested(
            mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config'),
    ) as (mock_load_system_paasta_config, ):
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={
                'fsm_cluster_map': {
                    'pnw-stagea': 'STAGE',
                    'norcal-stageb': 'STAGE',
                    'norcal-devb': 'DEV',
                    'norcal-devc': 'DEV',
                    'norcal-prod': 'PROD',
                    'nova-prod': 'PROD'
                },
            },
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)
def step_impl_when_fsm_auto(context):
    service = "new_paasta_service"

    fake_args = mock.Mock(
        yelpsoa_config_root=context.fake_yelpsoa_configs,
        srvname=service,
        auto=True,
        port=None,
        team='paasta',
        description=None,
        external_link=None,
    )
    with contextlib.nested(
            mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config'),
    ) as (
        mock_load_system_paasta_config,
    ):
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={
                'fsm_cluster_map': {
                    'pnw-stagea': 'STAGE',
                    'norcal-stageb': 'STAGE',
                    'norcal-devb': 'DEV',
                    'norcal-devc': 'DEV',
                    'norcal-prod': 'PROD',
                    'nova-prod': 'PROD'
                },
            },
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)
Beispiel #3
0
def step_impl_when_fsm_auto(context):
    service = "new_paasta_service"

    fake_args = mock.Mock(
        yelpsoa_config_root=context.fake_yelpsoa_configs,
        srvname=service,
        auto=True,
        port=None,
        team='paasta',
        description=None,
        external_link=None,
    )
    with contextlib.nested(
            mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config'),
    ) as (mock_load_system_paasta_config, ):
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={
                'fsm_cluster_map': {
                    'pnw-stagea': 'STAGE',
                    'norcal-stageb': 'STAGE',
                    'norcal-devb': 'DEV',
                    'norcal-devc': 'DEV',
                    'norcal-prod': 'PROD',
                    'nova-prod': 'PROD'
                },
                'fsm_deploy_pipeline': [
                    {
                        "instancename": "itest",
                    },
                    {
                        "instancename": "security-check",
                    },
                    {
                        "instancename": "push-to-registry",
                    },
                    {
                        "instancename": "performance-check",
                    },
                    {
                        "instancename": "stage.everything",
                        "trigger_next_step_manually": True,
                    },
                    {
                        "instancename": "prod.canary",
                        "trigger_next_step_manually": True,
                    },
                    {
                        "instancename": "prod.non_canary",
                    },
                    {
                        "instancename": "dev.everything",
                    },
                ],
            },
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)
Beispiel #4
0
def step_impl_when_fsm_auto(context):
    service = "my-cool-service"

    fake_args = mock.Mock(yelpsoa_config_root=context.fake_yelpsoa_configs, )
    with mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config', autospec=True) \
            as mock_load_system_paasta_config:
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={},
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)
Beispiel #5
0
def step_impl_when_fsm_auto(context):
    service = "my-cool-service"

    fake_args = mock.Mock(
        yelpsoa_config_root=context.fake_yelpsoa_configs,
    )
    with contextlib.nested(
            mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config'),
    ) as (
        mock_load_system_paasta_config,
    ):
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={},
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)
Beispiel #6
0
def step_impl_when_fsm_auto(context):
    service = "new_paasta_service"

    fake_args = mock.Mock(
        yelpsoa_config_root=context.fake_yelpsoa_configs,
        srvname=service,
        auto=True,
        port=None,
        team='paasta',
        description=None,
        external_link=None,
    )
    with contextlib.nested(
            mock.patch('paasta_tools.cli.cmds.fsm.load_system_paasta_config'),
    ) as (
        mock_load_system_paasta_config,
    ):
        mock_load_system_paasta_config.return_value = SystemPaastaConfig(
            config={
                'fsm_cluster_map': {
                    'pnw-stagea': 'STAGE',
                    'norcal-stageb': 'STAGE',
                    'norcal-devb': 'DEV',
                    'norcal-devc': 'DEV',
                    'norcal-prod': 'PROD',
                    'nova-prod': 'PROD'
                },
                'fsm_deploy_pipeline': [
                    {
                        "instancename": "itest",
                    },
                    {
                        "instancename": "security-check",
                    },
                    {
                        "instancename": "push-to-registry",
                    },
                    {
                        "instancename": "performance-check",
                    },
                    {
                        "instancename": "stage.everything",
                        "trigger_next_step_manually": True,
                    },
                    {
                        "instancename": "prod.canary",
                        "trigger_next_step_manually": True,
                    },
                    {
                        "instancename": "prod.non_canary",
                    },
                    {
                        "instancename": "dev.everything",
                    },
                ],
            },
            directory=context.fake_yelpsoa_configs,
        )
        paasta_fsm(fake_args)

    _load_yelpsoa_configs(context, service)