StackStorm-Exchange / stackstorm-terraform

Apache License 2.0
13 stars 16 forks source link

Publish output for the pipeline workflow #20

Open mjtice opened 4 years ago

mjtice commented 4 years ago

Hey guys, before I go too far with a PR are you okay if I publish the output of each task (on failure, to a dict) in the pipeline workflow?

e.g.

output:
  - errors: <% ctx().terraform_errors %>

vars:
  - terraform_errors:
      init: null
      select_workspace: null
      create_workspace: null
      plan: null
      apply: null
      destroy: null

... snip ...
next:
      - when: <% failed() %>
        publish:
          - terraform_errors:
              apply: <% task('apply') %>
        do: fail

Or is there something else you'd rather see?

nmaludy commented 4 years ago

I think this makes sense.

kingsleyadam commented 4 years ago

With the recent changes, we should be able to publish stderr upon failure. That should expose a more relevant message.

lorddaren commented 2 years ago

I have created pr https://github.com/StackStorm-Exchange/stackstorm-terraform/pull/34 to help start down this path. Is this something we can get reviewed? I can add in errors next.