st2 icon indicating copy to clipboard operation
st2 copied to clipboard

Config values from workflows

Open diellenne opened this issue 7 years ago • 11 comments

Would be really handy being able to read the values defined in a pack configuration file directly from a workflow definition; at the moment the only way I found to use configuration values in a workflow is to add the needed values in the output of an action and then publish them in the workflow'...in this way works but is not really a clean solution.

diellenne avatar May 03 '17 11:05 diellenne

@diellenne you should keep an eye on this PR https://github.com/StackStorm/st2/pull/3183 - I think that will address your requirements?

LindsayHill avatar May 03 '17 15:05 LindsayHill

If it's also supporting Mistral, yes! :)

diellenne avatar May 30 '17 08:05 diellenne

it would be a useful feature for our workflows too

jaf-jaf avatar Oct 06 '17 13:10 jaf-jaf

As a workaround, until this is implemented, you can use the config_context in your workflow's action metadata to a default value from the config

Example:

parameters:
    config_username:
        type: "string"
        description: "Username from the pack's config"
        required: true
        immutable: true
        default: "{{ config_context.username }}"

nmaludy avatar Nov 20 '17 13:11 nmaludy

+1 on this, @Thibault in Slack just asked for this feature (config context in mistral workflow)

nmaludy avatar Apr 06 '18 17:04 nmaludy

No I did'nt :) Wrong @thibault.

thibault avatar Apr 07 '18 10:04 thibault

+1 dalord on Slack just asked for this

nmaludy avatar Apr 14 '18 00:04 nmaludy

+1, this would be great.

mjtice avatar Apr 20 '18 13:04 mjtice

Maybe not @thibault, but @lemeur (who is a Thibault... nobody's perfect) So I vote +1

lemeur avatar May 09 '18 17:05 lemeur

+1 ! What is the status on this?

nschagen avatar Dec 20 '19 14:12 nschagen

Seems that this feature is still not implemented and is really required for the new Orchesta workflows.

I see it really necessary for correctly implementing packs and workflows.

It would also be good to be able to access to st2.user.config values from the workflow and from the actions too.

jesvilnie avatar Apr 03 '24 17:04 jesvilnie