Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Conditional Job Support #49

Open
eddiewebb opened this issue Aug 29, 2019 · 0 comments
Open

Conditional Job Support #49

eddiewebb opened this issue Aug 29, 2019 · 0 comments

Comments

@eddiewebb
Copy link

With current features we can use parameters to have conditional workflows and conditional steps

The latter (steps) gets a little ugly with the amount of nesting, but in the use case that I have an optional job I can work around this by redefining the entire workflow again, and include the extra job, but the permutations here could explode.

Use case - only publish asset when version is provided.

version: 2.1

parameters:
  publish_target:
    default: "" #empty values considered FALSEY
    type: string

workflows:
  basic:
    jobs:
      - sample_job:
          name: Build It
      - sample_job:
          name: Share It
          when: <<pipeline.parameters.publish_target>>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant