Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-19512

Add conditions to run a pipeline step

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

       Problem

      The need to avoid build steps based on certain conditions.

      Suggested solution

      Implement a clause when: as part of a step.

      e.g.

      - step:
         name: some conditional step
         script:
           - echo "run only if the condition is true"
         when: $(git diff --name-only --diff-filter=AMDR HEAD^ some-directory-or-file) != ""
      

            Unassigned Unassigned
            dsantos Daniel Santos (Inactive)
            Votes:
            186 Vote for this issue
            Watchers:
            85 Start watching this issue

              Created:
              Updated: