Skip to content

Allow to different presets to share code #9

@pkozielecki

Description

@pkozielecki

As is:

For now, when we want to add preset-specific code to a stage, we need to duplicate common code for all the presets, eg.:

report:
    default:
        - sh:
            command: "bundle exec danger"
        - copy_artifacts:
            path: $(ENV:BITRISE_DEPLOY_DIR)
    staging:
        - sh:
            command: "bundle exec danger"
        - sh:
            command: "preset-specific command"
        - copy_artifacts:
            path: $(ENV:BITRISE_DEPLOY_DIR)
    clientqa:
        - sh:
            command: "bundle exec danger"
        - sh:
            command: "preset-specific command"
        - copy_artifacts:
            path: $(ENV:BITRISE_DEPLOY_DIR)_

As it should be:

There should be a way to define a common code for all the presets within a given stage:

report:
    common:
        - sh:
            command: "bundle exec danger"
        - copy_artifacts:
            path: $(ENV:BITRISE_DEPLOY_DIR)
    staging:
        - sh:
            command: "preset-specific command"
    clientqa:
        - sh:
            command: "preset-specific command"_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions