Skip to content

[bitbucket] conditional steps and changesets attribute #8

Open
@bradrydzewski

Description

@bradrydzewski

Harness currently supports limiting Pipeline execution based on changed files, however, this is only supported through triggers. It is not support at the Stage or Step level. Here is an example of the Bitbucket syntax at the stage level [1]:

pipelines:
   default:
    - stage:
        name: Build and test
        condition:
          changesets:
            includePaths:
              # only xml files directly under path1 directory
              - "path1/*.xml"
              # any changes in deeply nested directories under path2
              - "path2/**"

And here is an example at the Step level:

pipelines:
  default:
    - step:
        name: step1
        script:
            - echo "failing paths"
            - exit 1
        condition:
            changesets:
                includePaths:
                  # only xml files directly under path1 directory
                  - "path1/*.xml"
                  # any changes in deeply nested directories under path2
                  - "path2/**"

[1] https://support.atlassian.com/bitbucket-cloud/docs/stage-options/#Changesets
[2] https://support.atlassian.com/bitbucket-cloud/docs/step-options/#Condition-changesets

Metadata

Metadata

Assignees

No one assigned

    Labels

    bitbucketBitbucket conversion targetgapHarness product gap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions