Skip to content

Disabling the deploy stage does not work #365

Open
@sbkok

Description

@sbkok

When you disable the deploy stage like this:

- name: sample-codebuild-only
    default_providers:
      source:
        provider: codecommit
        properties:
          account_id: 111111111111
      build:
        provider: codebuild
      deploy:
        provider: cloudformation
        enabled: False

It fails with the error: Wrong key 'enabled' in {'provider': 'cloudformation', 'enabled': False}.
Even though it is supposed to work according to the default deploy provider schema. See:

Optional('deploy'): And(
{
'provider': Or(
'cloudformation', 's3', 'codedeploy', 'lambda',
'service_catalog', 'codebuild'
),
Optional('enabled'): bool,
Optional('properties'): dict,

The problem is that the individual providers that it matches against does not support the enabled property. See:

lambda x: PROVIDER_DEPLOY_SCHEMAS[x['provider']].validate(x), #pylint: disable=W0108

and:

DEFAULT_CLOUDFORMATION_DEPLOY = {
"provider": 'cloudformation',
Optional("properties"): CLOUDFORMATION_PROPS
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions