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

Add conditions to run a pipeline step

    XMLWordPrintable

Details

    • 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.

    Description

       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) != ""
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsantos Daniel Santos
              Votes:
              95 Vote for this issue
              Watchers:
              45 Start watching this issue

              Dates

                Created:
                Updated: