Add conditions to run a pipeline step

XMLWordPrintable

    • 6

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

            Assignee:
            Edmund Munday
            Reporter:
            Daniel Santos (Inactive)
            Votes:
            206 Vote for this issue
            Watchers:
            97 Start watching this issue

              Created:
              Updated: